Here is the curl request that works
curl -X ‘GET’
‘https://myfullurlhere’
-H ‘accept: text/plain’
-H ‘X-API-Key: myapikey’
The code is RPGLE ^^FREE
I am trying to use the SQL functions so here is how i set up my options
exec sql values json_object(
‘basicAuth’ value ‘X-API-Key: myapikey’,
‘header’ value ‘accept: text/plain’
)
into :options;
then my call
exec SQL
values QSYS2.HTTP_GET(:urlRest, :options)
into :response;
This causes 38501 SQL error.
Any ideas how to make this work?
Thanks, Kita
I’ve tried several ways to send the options but to no avail.
Kits is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.