How to sent a POST request with form-data and parameters in PL/SQL

后端 未结 2 1233
滥情空心
滥情空心 2020-12-21 12:13

I\'m trying to call REST WebService in PL/SQL but it doesn\'t work. I get this error:

Content-type must be multipart/form-data

2条回答
  •  青春惊慌失措
    2020-12-21 13:01

    I use a similar procedure with POST method at the http request, however I'd set header like:

    UTL_HTTP.set_header( v_http_request, 
                         'Content-Type', 
                         'application/x-www-form-urlencoded;charset=utf-8' );
    

    Be aware also that, if the web-service site implements a security certificate, your DBA must create a wallet server-side, and before opening the request you should invoke that wallet:

    utl_http.set_wallet('file:', '');
    

    More on Wallets can be found here

提交回复
热议问题