| Modifier and Type | Field and Description |
|---|---|
| private transient Function | |
| private final HttpHeaders | |
| private final transient HttpRequest | |
| private final byte[] | |
| private final Charset | |
| private static final long | |
| private final HttpStatusCode | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | WebClientResponseException(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)
Constructor with response data only, and a default message. |
| public | WebClientResponseException(int status, String reasonPhrase, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request)
Constructor with response data only, and a default message. |
| public | WebClientResponseException(HttpStatusCode statusCode, String reasonPhrase, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request)
Constructor with response data only, and a default message. |
| public | WebClientResponseException(String message, int statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset)
Constructor with a prepared message. |
| public | WebClientResponseException(String message, int statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset, HttpRequest request)
Constructor with a prepared message. |
| public | WebClientResponseException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset, HttpRequest request)
Constructor with a prepared message. |
| Modifier and Type | Method and Description |
|---|---|
| private static HttpHeaders | copy(HttpHeaders headers)
Not all |
| public static WebClientResponseException | create(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)
Create |
| public static WebClientResponseException | create(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request)
Create |
| public static WebClientResponseException | create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request)
Create |
| private <E> E | |
| public HttpHeaders | |
| public int | getRawStatusCode()
Deprecated
since 6.0. as of 6.0, in favor of
getStatusCode()
Return the raw HTTP status code value. |
| public HttpRequest | |
| public < the expected target type E> E | Returns: the decoded content, ornull if there is no contentthe type to decode to targetType)Decode the error content to the specified type. |
| public <E> E | getResponseBodyAs(ParameterizedTypeReference<E> targetType)
Variant of |
| public byte[] | |
| public String | getResponseBodyAsString()
Return the response content as a String using the charset of media type for the response, if available, or otherwise falling back on UTF-8. |
| public String | getResponseBodyAsString(Charset
the charset to use if the Content-Type
of the response does not specify one. defaultCharset)Variant of |
| public HttpStatusCode | |
| public String | |
| private static String | |
| public void | setBodyDecodeFunction(Function<ResolvableType, ?>
the function to find a decoder with decoderFunction)Provide a function to find a decoder the given target type. |