How do I set headers in HTTP client?
Hi,
Since the Rest client has been removed, I now have to use the HTTP client to test my API requests. But I'm struggling to figure out how to send an 'auth-token' in the HTTP header for my GET request. This is easy to do in Postman as there's a 'headers' section - doesn't seem to be the case with the HTTP client in PHPStorm.
Can anyone advise please?
Many thanks
Kevin
Please sign in to leave a comment.
Please use following syntax:
Isn't 'auth-token' being automatically sent/generated by remote service using a client id and client secret?
Got it, thanks Dmitry, that works now. I'm getting the token via an initial get request which sends an email and password in a json object in the body, that returns the token - I'd already got that working, it was just the header bit I didn't know how to do.
Kevin
Cool, thanks for letting me know :)