utl 2craw json

Solutions on MaxInterview for utl 2craw json by the best coders in the world

showing results for - "utl 2craw json"
Gianluca
10 Sep 2016
1DECLARE
2 req   utl_http.req;
3 resp  utl_http.resp;
4 l_value VARCHAR2(1024);
5 l_url_import    VARCHAR2(500) := 'https://api.teamdynamix.com/TDWebApi/api/people';
6 l_url VARCHAR2(100) := 'https://api.teamdynamix.com/TDWebApi/api/auth/loginadmin';
7 l_content VARCHAR2(1000) := 'C:\SB\TeamDynamix\Files\xavier_to_teamdynamics.xlsx' ;
8BEGIN
9 
10  req := UTL_HTTP.begin_request( l_url, 'POST', UTL_HTTP.HTTP_VERSION_1_1 );    
11  UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0 (compatible)' );  
12  UTL_HTTP.SET_HEADER(req, 'Content-Type', 'application/json');
13  UTL_HTTP.SET_HEADER(req, 'Accept', 'application/json');
14  UTL_HTTP.SET_HEADER(req, 'Authorization', 'Bearer BEID: XXXXXX-XXXX-XXX-XXXXXXXX, WebServicesKey: XXXXXX-XXX-XXX-XXXXXXXX' );  
15 --- UTL_HTTP.SET_HEADER(req, 'Content-Length', 100000000);--LENGTH(l_Content));
16  UTL_HTTP.WRITE_text(req,  l_content);
17  resp := utl_http.get_response(req); 
18  dbms_output.put_line('Response');
19  LOOP
20    utl_http.read_line(resp, l_value, TRUE);
21    dbms_output.put_line('Value......'||l_value);
22  END LOOP;
23  utl_http.end_response(resp);
24EXCEPTION
25  WHEN utl_http.end_of_body THEN
26    utl_http.end_response(resp);
27  WHEN OTHERS THEN
28    dbms_output.put_line('Error');
29END;
30/
31
queries leading to this page
utl 2craw jsonutl 2craw json