-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to avoid sending user-agent header? #1479
Comments
@niftylettuce Not familiar with codebase much, but after digging a bit, it seems like |
Yes, I am completely OK with removing the user-agent added altogether. Please submit a PR |
|
This should be in the docs so users know they must explicitly set a User Agent as some CDNs block requests without it |
In unirest, when I don't specify
user-agent
header, it's just not sent. Howeversuperagent
sendsnode-superagent/5.0.2
..set('user-agent', undefined)
fails withTypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "user-agent"
.set('user-agent', '')
sends{ 'user-agent': '' }
.set('user-agent', null)
sends{ 'user-agent': 'null' }
The text was updated successfully, but these errors were encountered: