× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 7/22/2024 9:21 AM, Jay Vaughn wrote:
So after reading this entire thread and related links it is still
unclear the syntax to specify a bearer token in the header of an
qsys2.http_post...
Does anyone know?

The following does not work (and a vast variety of combinations of trial
and error did not either... )...

{"headers":{"content-type":"application/json","sslTolerate":true,"Authorization":
"Bearer <token>"}}

What version of IBM i are you using?
I ask because the docs for 7.3 don't include 'headers', but 7.4 and 7.5 do. https://www.ibm.com/docs/en/i/7.5?topic=functions-http-get-http-get-blob

Bobby posted the older style using multiple 'header' lines. A possible alternative for 7.4 and 7.5:

{"sslTolerate":true,
"headers":
{"Accept":"*",
"Host":"someplace.net",
"Content-Type":"application/json",
"Authorization":"Bearer <token>"
}
}


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.