Advertisement
Guest User

Untitled

a guest
Sep 14th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. create or replace procedure publish_cinema_even
  2. is
  3. req utl_http.req;
  4. res utl_http.resp;
  5. url varchar2(4000) := 'https://alsytto.onlyoffice.eu/api/2.0/authentication.xml?userName=email@mail.ru&password=password';
  6. name varchar2(4000);
  7. buffer varchar2(4000);
  8. content varchar2(4000) := '{}';
  9.  
  10. begin
  11. utl_http.set_wallet ('file:c:appwallet2','test1234');
  12. utl_http.set_detailed_excp_support (true);
  13. req := utl_http.begin_request(url, 'POST',' HTTP/1.1');
  14.  
  15. --UTL_HTTP.set_wallet('file:/c:apporaUserproduct12.1.0dbhome_1BINwallets', 'test1234');
  16. --utl_http.set_header(req, 'user-agent', 'mozilla/4.0');
  17. --utl_http.set_header(req, 'content-type', 'application/json');
  18. utl_http.set_header(req, 'Content-Length', length(content));
  19.  
  20. utl_http.write_text(req, content);
  21. res := utl_http.get_response(req);
  22. -- process the response from the HTTP call
  23. begin
  24. loop
  25. utl_http.read_line(res, buffer);
  26. dbms_output.put_line(buffer);
  27. end loop;
  28. utl_http.end_response(res);
  29. exception
  30. when utl_http.end_of_body
  31. then
  32. utl_http.end_response(res);
  33. end;
  34. end publish_cinema_even;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement