Closed amihaiemil closed 5 years ago
@bkuzmic I think we should make an HttpClient
decorator for this, rather than change every single place where an HttpRequest
is instantiated :D
@RobertoGraham great, thanks. I had no idea about that :)
@bkuzmic Let's use interceptors then.
I would personally do like the following on all your HttpClientBuilders, not sure how to do the Rultor version injection thing though
.addInterceptorFirst(
new RequestDefaultHeaders(
Collections.singletonList(
new BasicHeader(HttpHeaders.USER_AGENT, "")
)
)
)
We should add the User-Agent HTTP header to all our requests.
It should look like this:
<version>
should be apublic static final
constant, updated by Rultor onrelease