withRequestFactorySettings
open fun withRequestFactorySettings(requestFactorySettings: ClientHttpRequestFactorySettings): TestRestTemplate
Creates a new TestRestTemplate
with the same configuration as this one, except that it will apply the given ClientHttpRequestFactorySettings. The request factory used is a new instance of the underlying RestTemplate's request factory type (when possible).
Return
the new template
Since
3.4.1
Parameters
requestFactorySettings
the new request factory settings
open fun withRequestFactorySettings(requestFactorySettingsCustomizer: UnaryOperator<ClientHttpRequestFactorySettings>): TestRestTemplate
Creates a new TestRestTemplate
with the same configuration as this one, except that it will customize the ClientHttpRequestFactorySettings. The request factory used is a new instance of the underlying RestTemplate's request factory type (when possible).
Return
the new template
Since
3.4.1
Parameters
requestFactorySettingsCustomizer
a UnaryOperator to update thesettings