Getting error SQLERRM--> ORA-29266: end-of-body reached
When I add ?search=status:Terminated to the url I get this error, without this parameter I am able to get the desired data.
From postman https://xxxxxxxx/sims/?search=status:Terminated works fine.
I am not sure if it's the charset issue: I tried ('application/x-www-form-urlencoded;charset=UTF-8') but not working.
It seems to me server is sending empty response or no able to search via parameter or something like that. Is it encoding issue?
Please help!!
Database version: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
l_sim_req UTL_HTTP.req;
l_sim_res UTL_HTTP.resp;
l_sim_req_body VARCHAR2 (2000);
l_sim_response_dummy CLOB;
l_sim_response_text CLOB;
l_sim_req :=
UTL_HTTP.begin_request (
'https://xxxxxxxx/sims/?search=status:Terminated',
'GET',
'HTTP/1.1');
UTL\_HTTP.SET\_HEADER (l\_sim\_req, 'User-Agent', 'Mozilla/4.0');
UTL\_HTTP.set\_header (l\_sim\_req, 'Connection', 'keep-alive');
UTL\_HTTP.set\_header (l\_sim\_req,
'content-type',
'application/x-www-form-urlencoded'); --application/x-www-form-urlencoded--application/json
UTL\_HTTP.set\_header (l\_sim\_req,
'Authorization',
'Bearer ' || l\_token);
l\_sim\_res := UTL\_HTTP.get\_response (l\_sim\_req);
LOOP
DBMS\_OUTPUT.PUT\_LINE ('count');
UTL\_HTTP.read\_line (l\_sim\_res, l\_sim\_response\_dummy);
DBMS\_OUTPUT.PUT\_LINE (
'l\_sim\_response\_dummy-->' || l\_sim\_response\_dummy);
l\_sim\_response\_text :=
l\_sim\_response\_text || l\_sim\_response\_dummy;
END LOOP;
UTL_HTTP.end_response (l_sim_res);