Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

apex_web_service.make_rest_request ignores p_parm_name/p_parm_value

unficypMay 29 2023

Hi,

APEX 23.1 on 19c used here.

I have:

declare
v_ret clob;
v_body clob;
--
v_parm_names    apex_application_global.vc_arr2;
v_parm_values   apex_application_global.vc_arr2;
begin
--
apex_web_service.g_request_headers.delete();
apex_web_service.g_request_headers(1).name := 'Content-Type';
apex_web_service.g_request_headers(1).value := 'application/x-www-form-urlencoded';
--  
v_parm_names(1) := 'key1'; v_parm_values(1) := 'val1';
--
v_ret := apex_web_service.make_rest_request
(
 p_url     => 'http://192.168.0.110',
 p_http_method   => 'POST',
 p_username    => NULL,
 p_password    => NULL,
 p_scheme    => 'Basic',
 p_proxy_override  => NULL,
 p_transfer_timeout  => 15,
 p_body     => NULL,
 p_body_blob    => EMPTY_BLOB(),
 p_parm_name    => apex_string.string_to_table('key1'), --v_parm_names,
 p_parm_value   => apex_string.string_to_table('val1'), --v_parm_values,
 p_wallet_path   => NULL,
 p_wallet_pwd   => NULL,
 p_https_host   => NULL,
 p_credential_static_id => NULL,
 p_token_url    => NULL
);
dbms_output.put_line(v_ret);
end;
/

which gives:

[root@oracle tmp]# nc -l -p 80 


POST / HTTP/1.1 
Host: 192.168.0.110 
Proxy-Connection: Keep-Alive 
Content-Type: application/x-www-form-urlencoded 
Connection: close

How are p_parm_name and p_parm_value are supposed to work ?

How can i transfer POST (form) parameters using apex_web_service.make_rest_request ?

regards,

Gerald

This post has been answered by Steve Muench-Oracle on May 29 2023
Jump to Answer
Comments
Post Details
Added on May 29 2023
7 comments
1,089 views