1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
declare
req utl_http.req;
res utl_http.resp;
url varchar2(128) := 'http://myurl';
buffer varchar2(8000);
contentJSON varchar2(8000) :=
'{
"toto":"ABC:DEF"
}';
begin
req := utl_http.begin_request(url, 'POST');
utl_http.set_header(req, 'user-agent', 'mozilla/4.0');
utl_http.set_header(req, 'content-type', 'application/json');
utl_http.set_header(req, 'Content-Length', length(contentJSON));
utl_http.write_text(req, contentJSON);
res := utl_http.get_response(req);
end;
/ |
Partager