|
I am able to use the HTTP handler to add Authorization but it seems like
Bearer is not suppoted by APIs? its keep saying bad request if I don't
pass it then I get UNAUTHORIZED Response. Is there something else needs to
be added to the header to make it work?
Here is the http log..
HTTPAPI Ver 1.39 released 2018-03-09
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R2M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 10
DNS resolver options: x'00000136'
DNS default domain: mycom.COM
DNS server found: 10.35.21.150
DNS server found: 10.50.1.10
DNS server found: 10.35.19.50
Nagle's algorithm (TCP_NODELAY) disabled.
http_persist_req(GET) entered.
http_long_ParseURL(): entered
http_long_ParseURL(): entered
do_oper(GET): entered
There are 0 cookies in the cache
GET
/customer-matching-service/v1/matching/finder?countryCode=US&addressLine1=4750+KIPLING+ST+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&postalCode=80033&customerName=CONOCOPHILLIPS%20COMPANY
HTTP/1.1
Host: dc2-mycom.com:11184
User-Agent: http-api/1.39
Accept-Encoding: gzip,deflate
Authorization: Bearer
eyJhbGciOiJIUzaWIiLCJjcmVhdGVkIjoxNDk0MjU1ODcxMjA4LCJuYW1lIjoiX0cyLjBDcmVkaXRBcHAiLCJ3YXJlaG91c2UiOm51bGwsImV4cCI6NTY4NTQwMDgwMCwiZW1haWwiOm51bGx9.vgr3dDDeKgQmaNXRAIA7pFWa-2CbVOUZZbtg9v1ZDpQKXd5VKmRVV46Ltc2wVj3UmU_CtkWky6EkkruQjH8O_Q
recvresp(): entered
HTTP/1.1 400 Bad Request
X-Powered-By: Servlet/3.1
X-Application-Context: customer-matching-service:dev:11184
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Language: en-US
Transfer-Encoding: chunked
Connection: Close
Date: Wed, 22 Aug 2018 19:39:02 GMT
SetError() #13: HTTP/1.1 400 Bad Request
recvresp(): end with 400
recvdoc parms: chunked 0
header_load_cookies() entered
recvchunk(): entered
get_chunk_size(): entered
0
chunk size = 0
get_chunk_size returned 0
SetError() #13: HTTP/1.1 400 Bad Request
http_close(): entered
On Tue, Aug 21, 2018 at 6:05 PM Mohammad Tanveer <surgum@xxxxxxxxx> wrote:
Anyone knows or have an example how to call http request using LIBHTTP
APIS using Authentication Type Bearer?
Or
How can we add header parameters?
Regards
As an Amazon Associate we earn from qualifying purchases.
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.