Open
Description
My test is broken after rest-assured
dependency removed, I found it caused by TestRestTemplate
inconsistent follow redirects. TestRestTemplate
will use apache httpclient since org.apache.httpcomponents: httpclient
is introduced by rest-assured
, following redirects is disabled by default, thanks to #1497, you can enable it by passing HttpClientOption.ENABLE_REDIRECTS
.
If apache httpclient is not present, TestRestTemplate
will fallback to okhttp3:
okhttp3 enable following redirects by default, I think TestRestTemplate
should keep same behavior not matter which underlying implementation, disabling following redirects is sensible since test want to know which url is redirected to, and it would be better if this option can be mutated.