How to pass authorization header using curl?
Answers (1)
curl uses the Basic HTTP authentication:
curl --user name:password www.example.com
Before transmission the string name:password is encoded with the Base 64 algorithm. The Base64-encoded string is transmitted in the HTTP header and decoded by the receiver, resulting in the same string name:password.
On Qsponge also uses the Basic HTTP authentication for its API:curl --user username:apikey --data "q=QUESTION" api.qsponge.com/v1/questions/ask.xml
username and apikey for Qsponge API are available upon request for developers.
Related Questions