curl with headers code example
Example 1: curl pass a header
curl -H "Accept-Charset: utf-8" -H "Content-Type: application/x-www-form-urlencoded" http:
Example 2: curl host header
curl --header "Host: example.com" http:
Example 3: curl headers
# -i to include response headers in the output.
# -H to specify a header
# -X to specify the request method
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http:
Example 4: curl check response headers
Just use '-ISs' flag options I:(only headers), sS:(silence and no errors)
curl www.example -ISs