| Modifier and Type | Field and Description |
|---|---|
| private transient Function | |
| private static final Charset | |
| private final byte[] | |
| private final String | |
| private final HttpHeaders | |
| private static final long | |
| private final HttpStatusCode | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | RestClientResponseException(String message, int
the raw status code value statusCode, String the status text statusText, HttpHeaders the response headers (may be headers, byte[] null)the response body content (may be responseBody, Charset null)the response body charset (may be responseCharset)null)Construct a new instance of with the given response data. |
| public | RestClientResponseException(String message, HttpStatusCode
the raw status code value statusCode, String the status text statusText, HttpHeaders the response headers (may be headers, byte[] null)the response body content (may be responseBody, Charset null)the response body charset (may be responseCharset)null)Construct a new instance of with the given response data. |
| Modifier and Type | Method and Description |
|---|---|
| private static HttpHeaders | copyHeaders(HttpHeaders headers)
Copies the given headers, because the backing map might not be serializable. |
| public int | getRawStatusCode()
Deprecated
since 6.0. as of 6.0, in favor of
getStatusCode()
Return the raw HTTP status code value. |
| public < the expected target type E> E | Returns: the converted object, ornull if there is no contentthe type to convert to targetType)Convert the error response content to the specified type. |
| public <E> E | getResponseBodyAs(ParameterizedTypeReference<E> targetType)
Variant of |
| private <E> E | |
| public byte[] | |
| public String | |
| public String | getResponseBodyAsString(Charset
the charset to use on if the response doesn't specify. fallbackCharset)Return the response body converted to String. |
| public HttpHeaders | |
| public HttpStatusCode | |
| public String | |
| public void | setBodyConvertFunction(Function<ResolvableType, ?>
the function to use bodyConvertFunction)Provide a function to use to decode the response error content
via |
| bodyConvertFunction | back to summary |
|---|---|
| private transient Function<ResolvableType, ?> bodyConvertFunction
| |
| DEFAULT_CHARSET | back to summary |
|---|---|
| private static final Charset DEFAULT_CHARSET | |
| responseBody | back to summary |
|---|---|
| private final byte[] responseBody | |
| responseCharset | back to summary |
|---|---|
| private final String responseCharset
| |
| responseHeaders | back to summary |
|---|---|
| private final HttpHeaders responseHeaders
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| statusCode | back to summary |
|---|---|
| private final HttpStatusCode statusCode | |
| statusText | back to summary |
|---|---|
| private final String statusText | |
| RestClientResponseException | back to summary |
|---|---|
| public RestClientResponseException(String message, int statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Construct a new instance of with the given response data.
| |
| RestClientResponseException | back to summary |
|---|---|
| public RestClientResponseException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Construct a new instance of with the given response data.
| |
| copyHeaders | back to summary |
|---|---|
| private static HttpHeaders copyHeaders(HttpHeaders headers) Copies the given headers, because the backing map might not be serializable.
| |
| getRawStatusCode | back to summary |
|---|---|
| public int getRawStatusCode()
Return the raw HTTP status code value.
| |
| getResponseBodyAs | back to summary |
|---|---|
| public <E> E getResponseBodyAs(Class<E> targetType) Convert the error response content to the specified type. | |
| getResponseBodyAs | back to summary |
|---|---|
| public <E> E getResponseBodyAs(ParameterizedTypeReference<E> targetType) Variant of
| |
| getResponseBodyAs | back to summary |
|---|---|
private <E> E getResponseBodyAs(ResolvableType targetType)
| |
| getResponseBodyAsByteArray | back to summary |
|---|---|
| public byte[] getResponseBodyAsByteArray() Return the response body as a byte array. | |
| getResponseBodyAsString | back to summary |
|---|---|
| public String getResponseBodyAsString() Return the response body converted to String. The charset used is that
of the response "Content-Type" or otherwise | |
| getResponseBodyAsString | back to summary |
|---|---|
| public String getResponseBodyAsString(Charset fallbackCharset) Return the response body converted to String. The charset used is that of the response "Content-Type" or otherwise the one given.
| |
| getResponseHeaders | back to summary |
|---|---|
| public HttpHeaders getResponseHeaders() Return the HTTP response headers.
| |
| getStatusCode | back to summary |
|---|---|
| public HttpStatusCode getStatusCode() Return the HTTP status code.
| |
| getStatusText | back to summary |
|---|---|
| public String getStatusText() Return the HTTP status text. | |
| setBodyConvertFunction | back to summary |
|---|---|
| public void setBodyConvertFunction(Function<ResolvableType, ?> bodyConvertFunction) Provide a function to use to decode the response error content
via
| |