× 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.



but that is the exact format I'm using and it is not working

sql sate 38501
vendor code -443

axis error :httpTransportException: Cannot initialize a channel to the
remote end.

thanks

Jay

On Mon, Jul 22, 2024 at 1:31 PM Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
wrote:

Buck,

we have been using headers (plural) with other requests... so will use
your example below...

thanks!!!

jay

On Mon, Jul 22, 2024 at 1:26 PM Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

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>"
}
}

--
--buck

http://wiki.midrange.com
Your updates make it better!


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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.