-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Autoconfigure settings such as timeouts and redirects for RestClient and RestTemplate and WebClient #43068
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
Comments
I would like to prepare an PR if the team accepts the proposal. |
Apologies if I have have misunderstood the proposal, but don't we already have this? |
My apologies, I didn't notice that. |
But I think we should specify sensible default timeout, “Infinity” is a very bad default timeout. |
I don't think it is infinity, at least not in all cases as it depends on the underlying client. For example, the Apache HTTP client has default connect and read timeouts of 3 minutes. Generally speaking, we prefer to keep each client's defaults as any differences may part of the reason why someone has chosen a particular client. Redirects are an exception to this as we wanted the upgrade experience to be as smooth as possible. |
We should introduce a
@ConfigurationProperties
bean for[RestClient|RestTemplate|WebClient]AutoConfiguration
.The text was updated successfully, but these errors were encountered: