# How to Add a Header to a curl Request

DevFeed: [How to Add a Header to a curl Request](<https://devfeed.tech/articles/how-to-add-a-header-to-a-curl-request-37476.md>)

Original publisher: [Read original article](<https://davidwalsh.name/curl-add-header>)

Author: David Walsh

Published: 2024-08-03T16:51:46Z

Content type: tutorial

Language: en

Sources: [David Walsh](<https://devfeed.tech/sources/david-walsh.md>)

Topics: [cURL](<https://devfeed.tech/topics/curl.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [curl](<https://devfeed.tech/tags/curl.md>), [headers](<https://devfeed.tech/tags/headers.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [http](<https://devfeed.tech/tags/http.md>), [quick-tips](<https://devfeed.tech/tags/quick-tips.md>), [quick-tips-shell](<https://devfeed.tech/tags/quick-tips-shell.md>), [request](<https://devfeed.tech/tags/request.md>), [shell](<https://devfeed.tech/tags/shell.md>)

## AI overview

A tutorial explaining how to add one or more HTTP headers to a curl request using the -H flag, with context about curl's use for downloading files and testing APIs.

## Source excerpt

curl is one of those great utilities that's been around seemingly forever and has endless use cases. These days I find myself using curl to batch download files and test APIs. Sometimes my testing leads me to using different HTTP headers in my requests. To add a header to a curl request, use the -H [...] The post How to Add a Header to a curl Request appeared first on David Walsh Blog.