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