Skip to content
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

Default user agent for Web Client #517

Closed
tsegismont opened this issue Feb 3, 2017 · 0 comments
Closed

Default user agent for Web Client #517

tsegismont opened this issue Feb 3, 2017 · 0 comments
Assignees

Comments

@tsegismont
Copy link
Contributor

tsegismont commented Feb 3, 2017

Many public APIs want requests with a User-Agent header. Some of them apply low rate limits to "anonymous" agent requests, some (GitHub) just deny them (403).

Most HTTP libraries set this header by default:

  • Java/_version_
  • Python-urllib/_version_
  • Jakarta Commons-HttpClient/_version_
  • Apache-HttpClient/_version_
  • curl/_version_
  • okhttp/_version_

The list goes on.

I suggest we add a default one with this format Vert.x-WebClient/3.4.0 (as per RFC 2616)

The version of course must be adapted to the current artifact version.

@tsegismont tsegismont self-assigned this Feb 3, 2017
tsegismont added a commit to tsegismont/vertx-web that referenced this issue Feb 3, 2017
A version file is generated during the build.
The Web client reads this file to build a user agent string.
The user agent is added only if the user has not set one.
tsegismont added a commit to tsegismont/vertx-web that referenced this issue Feb 3, 2017
A version file is generated during the build.
The Web client reads this file to build a user agent string.
The user agent is added only if the user has not set one.
@vietj vietj closed this as completed in 0375a6b Feb 6, 2017
@vietj vietj removed the to review label Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants