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

Adding POC for a client options configurer. #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Bwvolleyball
Copy link

We've been facing an error with a passthrough request where the response headers are too big for the HTTP client.

Can we add a means to allow configuring the underlying HTTP client, just so that we can supply a few tweaks to make it work for this request?

.build();
return new ClientOptions(environment, headers, headerSuppliers, okhttpClient);
OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder()
.addInterceptor(new RetryInterceptor(3));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be configurable as well in case I want to implement my own retry logic? And this one as a default retry mechanism that can be replaced if needed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory you could add a new interceptor that handles retry in your way, but I'm not sure if you could clear any existing interceptors already, but you might be able to if this got merged.

Don't hold your breath though @bitsal, there's been no movement on this PR or acknowledgement of this from the merge team since I've raised the idea.

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

Successfully merging this pull request may close these issues.

2 participants