TestRestTemplate does not allow redirects to be customized#43258
TestRestTemplate does not allow redirects to be customized#43258quaff wants to merge 1 commit intospring-projects:mainfrom
Conversation
redirects method to RestTemplateBuilderwithRedirects 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