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
I don't think you can use a POST with GET query like you do in the URL...
It looks quite difficult to do what you expect. Here is some input from Ask Tom:
The idea is to generate the post text, including a specific "boundary", which will look like this:
POST /path/to/script.php HTTP/1.0 Host: example.com Content-type: multipart/form-data, boundary=AaB03x Content-Length: $requestlen --AaB03x content-disposition: form-data; name="field1" $field1 --AaB03x content-disposition: form-data; name="field2" $field2 --AaB03x content-disposition: form-data; name="userfile"; filename="$filename" Content-Type: $mimetype Content-Transfer-Encoding: binary $binarydata --AaB03x--
There is also same issue developed here with lots of code.
Hope it helps.
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:<your wallet file route>', '<your pass>');
More on Wallets can be found here