2

I would like to do a POST from PL/SQL, using as enctype "Multipart/form-data" in order to post a document contained in a LONG RAW to a servlet. This would simulate a typical "FILE UPLOAD" as if done by a browser.

I was wondering if there is any example on how to do it..

I think something like that could work .. but a working example would be very much appreciated

document long raw;
env VARCHAR2(32767);
mytable record of varchar2(32767);
http_req utl_http.req;
BEGIN
http_req:=utl_http.begin_request(url,'POST');
utl_http.set_header(http_req,'Content-Type','multipart/form-data');
...
mytable:=longraw_to_hex(document)
foreach line in mytable
utl_http.write_text(http_req,chunk)
..
END
J. Chomel
  • 8,193
  • 15
  • 41
  • 69
Winter
  • 1,896
  • 4
  • 32
  • 41
  • Possible duplicate of [How to sent a POST request with form-data and parameters in PL/SQL](https://stackoverflow.com/questions/44393679/how-to-sent-a-post-request-with-form-data-and-parameters-in-pl-sql) – J. Chomel Jun 07 '17 at 11:13

0 Answers0