How can I set the request header for curl?

ryan picture ryan · Nov 18, 2010 · Viewed 241.7k times · Source

How would I pass multiple values in the header for a curl request?

Answer

Mads Mobæk picture Mads Mobæk · Nov 18, 2010

Just use the -H parameter several times:

curl -H "Accept-Charset: utf-8" -H "Content-Type: application/x-www-form-urlencoded" http://www.some-domain.com