Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

call put API by oracle apex

SALEEM_YEMENJan 3 2024

declare
l_response_clob clob;
l_clob CLOB;
ename varchar2(100);
sal number;
l_body varchar2(100);
nemp number;
BEGIN
ename:=:P3_ENAME;sal:=:P3_SAL;nemp:=:P3_NO;
apex_web_service.g_request_headers(1).name := 'Content-Type';
apex_web_service.g_request_headers(1).value := 'application/json';
l_clob := apex_web_service.make_rest_request(
p_url => 'http://localhost:8080/ords/apex21c/admin/getnam',
p_http_method => 'put',
p_body =>'{"empno":'||nemp||',"ename":"'||ename||'","sal":'||sal||'}');
END;

Comments
Post Details
Added on Jan 3 2024
1 comment
160 views