Add a custom request header.
Section: Request Shaping
Send a request header
bash
bash
curl -H 'Accept: application/json' https://api.example.com/itemsExplanation
Use `-H` repeatedly to send multiple headers.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Request Shaping
Use a custom HTTP method
Send a method such as PUT, PATCH, DELETE, or PURGE.
Append query parameters with --get
Build a GET query string from data parameters.