Consuming Rest API from PL/SQL using UTL_HTTP - body not recognized [message #686414] |
Thu, 08 September 2022 06:40 |
|
skfaheem024
Messages: 5 Registered: September 2022
|
Junior Member |
|
|
Hi,
I am new to this forum and consuming Rest API's using PL/SQL. I am trying to consume a rest service from pl/sql, but the server is not able to identify the request. The same request works from postman.. so no problem in the service, something with my pl/sql code i think..
I am trying the free api provided by rapidapi. (link, code and script are attached as i am not able to use links in my first post)
|
|
|
|
Re: Consuming Rest API from PL/SQL using UTL_HTTP - body not recognized [message #686416 is a reply to message #686414] |
Thu, 08 September 2022 09:07 |
John Watson
Messages: 8950 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Welcome to the forum.
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Can you work up to the problem slowly, one bit at a time? Rather than trying to write the whole procedure in one shot? For example, first the basic connectivity. This works for me:orclz>
orclz> select utl_http.request('https://weatherapi-com.p.rapidapi.com/ip.json',wallet_path=>'file:c:\tmp\wallet') from dual;
UTL_HTTP.REQUEST('HTTPS://WEATHERAPI-COM.P.RAPIDAPI.COM/IP.JSON',WALLET_PATH=>'FILE:C:\TMP\WALLET')
-----------------------------------------------------------------------------------------------------------------------------------------
{"message":"Invalid API key. Go to https:\/\/docs.rapidapi.com\/docs\/keys for more info."}
orclz>
|
|
|
|
|