Page 1 of 1

Adding Auth Key to HTTP Header

Posted: Mon Sep 20, 2021 11:26 pm
by mbwswim
I read a few posts on this and it was nto clear enough to me.
Some said to use HTTP _ADDL_HEADER or something like that and that is not active in HTTPAPI.
So I do not know what to use to send my auth key.
I can do this in postman, so I know it works, I just can't here and we want to get the data on to ibmi.

Re: Adding Auth Key to HTTP Header

Posted: Tue Sep 21, 2021 1:11 am
by Scott Klement
Can you explain a little more? There are lots of different types of authentication. What are you trying to do?

Re: Adding Auth Key to HTTP Header

Posted: Fri Sep 24, 2021 3:53 pm
by jonboy49
Perhaps if you showed us what you are sending with Postman we could understand the type of authentication you are trying to do.

Re: Adding Auth Key to HTTP Header

Posted: Wed Oct 06, 2021 10:37 pm
by JJDalglish
I know the below example is in curl, but since I don't how how to do it using HTTP, that is all I can provide right now.

Using HTTP, I'd like to know how to pass these values:
X-API-Key:
Return-Request:
Return-Response:


--------------------------

curl --location --request POST 'https://try-test.anysportsapi.com/department/create' \
--header 'X-API-Key: akdalsda9das8d980da0dasda' \
--header 'Return-Request: 0' \
--header 'Return-Response: 1' \
--header 'Content-Type: application/json' \
--data-raw '{"id": "9998","name": "Test Department 9998"}'



Thanks!

Re: Adding Auth Key to HTTP Header

Posted: Thu Oct 07, 2021 11:52 am
by jonboy49
Take a look at this post - it shows how to add such headers.

viewtopic.php?p=97#p97

Re: Adding Auth Key to HTTP Header

Posted: Thu Oct 07, 2021 9:41 pm
by JJDalglish
THANK YOU !!!!!!!!!!