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

allow overriding custom http client properties #3170

Closed
jrhizor opened this issue May 26, 2021 · 1 comment
Closed

allow overriding custom http client properties #3170

jrhizor opened this issue May 26, 2021 · 1 comment

Comments

@jrhizor
Copy link
Contributor

jrhizor commented May 26, 2021

I would like to be able to customize client-level settings for the underlying OkHttpClient while still using the majority of defaults in HttpClientUtils.createHttpClient.

The specific use case I'm interested in is customizing the connection pool used by the client because we're running into an issue where it blocks program closure by taking 5 min to give up an idle connection. If this was modifiable we could customize this:

httpClientBuilder.connectionPool(new ConnectionPool(5, 30, TimeUnit.SECONDS));

The reason I'd like to be able to modify this is because HttpClientUtils.createHttpClient sets a lot of useful defaults. I don't want to have to create and maintain a duplicate of HttpClientUtils.createHttpClient in my code base just so I can modify this.

This can be achieved by making HttpClientUtils.createHttpClient public. Additional overrides can be supplied via the additionalConfig consumer.

@manusa
Copy link
Member

manusa commented Jun 14, 2021

Should have been fix by #3171

@manusa manusa closed this as completed Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants