Closed gittyup2018 closed 4 months ago
The User-Agent is just a header and can be set as such. To remove User-Agent entirely
http --offline pie.dev/headers User-Agent:''
or to send a blank one (which I'm not sure is what you want)
http --offline pie.dev/headers User-Agent:' '
n.b. that's not actually blank, I believe it will send a blank space as the UA.
See the documentation on setting headers here
Yes, just specify the header without any value.
$ http --offline pie.dev/headers User-Agent:
GET /headers HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: pie.dev
Docs: https://httpie.io/docs/cli/empty-headers-and-header-un-setting
Hi,
Could you tell me how to remove the DEFAULT_UA? First I thought there would be a simple --no-useragent setting or even --user-agent flag where I could quickly set an alias but apparently not then I tried making a default ~/.config/httpie/config.json file
{ "headers": { "User-Agent":"", }
but that didn't work either