curl -H

 curl -H  is a command line option for the curl command that takes a single parameter of an extra header to include in the request.

Examples
curl -H "Accept: application/json"

To set multiple headers, repeat the option, e.g.:

curl -H "Accept: application/json" -H "Content-Type: application/json"

PHP
Equivalent in PHP for setting a header in a curl handler:

Equivalent in PHP for setting multiple curl headers in a curl handler:

IndieWeb Applications
There are several uses of setting HTTP headers within various IndieWeb building blocks


 * Sending an IndieAuth access token to a Micropub endpoint to create a post: curl -H "Authorization: Bearer XXXXXXXX"