-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TestRestTemplate does not allow redirects to be customized #43258
Conversation
redirects
method to RestTemplateBuilder
withRedirects
method to TestRestTemplate
and deprecate HttpClientOption.ENABLE_REDIRECTS
withRedirects
method to TestRestTemplate
and deprecate HttpClientOption.ENABLE_REDIRECTS
…lientOption.ENABLE_REDIRECTS` Closes spring-projectsGH-27360
Add `redirects(...)` method to `RestTemplateBuilder` to allow redirect customization. This new method is required in 3.4 since the default redirect strategy for some clients has changed and users need a way to restore the old behavior. See gh-43258
Remove deprecations and new methods in `TestRestTemplate` in favor of passing in a configured `RestTemplateBuilder`. See gh-43258
Thanks @quaff. I've simplified things a bit in 8b83afd so that we're no longer needing so many changes to There's still some more improvements I'd like to make to |
@philwebb You removed |
That's a good point, I overlooked the injection. I was keen to not add more public API to I'll reopen the issue to consider things a bit more. |
Thanks again for the feedback @quaff. I've added a |
@quaff Do you need to be able to update just the redirects? I assumed that using a complete |
Yes. |
I like the |
Closes GH-27360