Authentication on GET help
Posted: Fri Oct 14, 2022 1:50 pm
Hi Everyone!
I'm looking for some help. I have an API over HTTPS that requires POST at login, from there you can use either the security cookie or token supplied in the returned JSON. My issue is with the next GET, POST, PUT, or DELETE request. I turned on debugging and reviewed the log, I don't think the API likes setAuth or setOption. The website's directions are very specific about what needs to be supplied in the header.
After logging in, all subsequent requests require -H Authorization and -H Content-Type. For example,
curl -X GET -H "Authorization: MY_TOKEN_ AT_LOGIN_OR_SEC_COOKIE" -H "Content-Type: application/json"
'https://mywebsite.com/Projects/api/gets ... =something'
How do you regurgitate Auth and Content in the header of requests?
Thank you,
Brian
I'm looking for some help. I have an API over HTTPS that requires POST at login, from there you can use either the security cookie or token supplied in the returned JSON. My issue is with the next GET, POST, PUT, or DELETE request. I turned on debugging and reviewed the log, I don't think the API likes setAuth or setOption. The website's directions are very specific about what needs to be supplied in the header.
After logging in, all subsequent requests require -H Authorization and -H Content-Type. For example,
curl -X GET -H "Authorization: MY_TOKEN_ AT_LOGIN_OR_SEC_COOKIE" -H "Content-Type: application/json"
'https://mywebsite.com/Projects/api/gets ... =something'
How do you regurgitate Auth and Content in the header of requests?
Thank you,
Brian