curl headers authorization code example
Example 1: curl authorization header
curl -H "Authorization: token_str" http://www.example.com
Example 2: 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://hostname/resource