cURL adds certain default request headers into the request made such as Host, Accept-Language etc.
As per How can I remove default headers that cURL sends? in order to remove these default headers we need to do something like this:
-H 'Host:'
I would like to send the following headers [in the given order]
curl -H 'accept:*/*' -H 'host:www.example.com'
But due to curl adding its default headers, I see this
Host: www.example.com
accept: */*
How do we ensure the default headers are not added here?
Also, what if we need to remove the default header but replace it with a more customised header [say 'Host' to 'host']? What are we supposed to do? I am thinking on these lines
-H 'Host:' -H 'host:www.example.com'
Is this the right way to handle this requirement? If it is, is it the ideal way? Are there other ways to remove default headers added by cURL?
Host:andhost:are the same header. Why do you need to force it to lower-case?