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.
Adding Auth Key to HTTP Header
-
- Site Admin
- Posts: 872
- Joined: Sun Jul 04, 2021 5:12 am
Re: Adding Auth Key to HTTP Header
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
Perhaps if you showed us what you are sending with Postman we could understand the type of authentication you are trying to do.
-
- Posts: 4
- Joined: Wed Oct 06, 2021 10:32 pm
Re: Adding Auth Key to HTTP Header
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!
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!
-
- Posts: 4
- Joined: Wed Oct 06, 2021 10:32 pm
Re: Adding Auth Key to HTTP Header
THANK YOU !!!!!!!!!!