How can I remove default headers that cURL sends?

Use -H flag with the header you want to remove and no content after the :

-H, --header LINE   Custom header to pass to server (H)

Sample

-H 'User-Agent:'

This will make the request without the User-Agent header (instead of sending it with an empty value)


Seems like curl sends 3 headers. To do a request without them you can append the arguments:

-H 'User-Agent:' -H 'Accept:' -H 'Host:'

+1 to @cmlndz answer as he explains how to remove a single header.

You can check which headers are actually sent by adding -v.