httpie/cli

How to remove DEFAULT_UA?

gittyup2018 opened this issue · 2 comments

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

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