Question

How to pass authorization header using curl?


Answers (1)

by Jeong-Ho Lee 13 years ago

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

New to Qsponge? Sign Up!

Already a Member?Login!

 

Ask a Question!

All questions submitted to Qsponge are anonymous, no user information is associated with any question.