WebClient defaultStatusHandler do not apply to exchangeTo*
This commit documents the fact that default status handlers configured on the `WebClient` are not applied to `exchangeTo*` methods as those variants give full access to the client response. Applying them here would restrict the ability to adapt the behavior depending on the HTTP response status. Closes gh-30059
This commit is contained in:
@@ -263,6 +263,8 @@ public interface WebClient {
|
||||
* apply to every response. Such default handlers are applied in the
|
||||
* order in which they are registered, and after any others that are
|
||||
* registered for a specific response.
|
||||
* <p>The default status handlers are not applied to {@code exchangeTo*()}
|
||||
* methods, as those variants have direct access to the client response.
|
||||
* @param statusPredicate to match responses with
|
||||
* @param exceptionFunction to map the response to an error signal
|
||||
* @return this builder
|
||||
|
||||
Reference in New Issue
Block a user