Search…
README
How to read this book
The cURL project
Network and protocols
Install curl
Source code
Build curl
Command line basics
Using curl
HTTP with curl
Protocol basics
Responses
Authentication
Ranges
HTTP versions
Conditionals
HTTPS
HTTP POST
Multipart formposts
-d vs -F
Redirects
Modify the HTTP request
Request method
Request target
Fragment
Customize headers
Referer
User-agent
HTTP PUT
Cookies
HTTP/2
Alternative Services
HTTP/3
HSTS
HTTP cheat sheet
Scripting browser-like tasks
FTP with curl
Using libcurl
HTTP with libcurl
Bindings
libcurl internals
Index
Powered By
GitBook
Modify the HTTP request
As described earlier, each HTTP transfer starts with curl sending an HTTP request. That request consists of a request line and a number of request headers, and this chapter details how you can modify all of those.
​
Request method
​
​
Request target
​
​
Fragment
​
​
Customize headers
​
​
Referer
​
​
User-agent
​
Of course, changing the
HTTP version
is another way to alter the request.
Previous
Redirects
Next
Request method
Last modified
7mo ago
Export as PDF
Copy link
Edit on GitHub