public class HttpClientErrorException extends HttpStatusCodeException
DefaultResponseErrorHandler,
Serialized Form| Constructor and Description |
|---|
HttpClientErrorException(HttpStatus statusCode)
Constructor with a status code only.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Constructor with a status code and status text.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, and content.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content.
|
HttpClientErrorException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content,
and an prepared message.
|
| Modifier and Type | Method and Description |
|---|---|
static HttpClientErrorException |
create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create
HttpClientErrorException or an HTTP status specific sub-class. |
static HttpClientErrorException |
create(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Variant of
create(HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message. |
getStatusCodegetRawStatusCode, getResponseBodyAsByteArray, getResponseBodyAsString, getResponseBodyAsString, getResponseHeaders, getStatusTextcontains, getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic HttpClientErrorException(HttpStatus statusCode)
public HttpClientErrorException(HttpStatus statusCode, String statusText)
public HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable byte[] body, @Nullable Charset responseCharset)
public HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable HttpHeaders headers, @Nullable byte[] body, @Nullable Charset responseCharset)
public HttpClientErrorException(String message, HttpStatus statusCode, String statusText, @Nullable HttpHeaders headers, @Nullable byte[] body, @Nullable Charset responseCharset)
public static HttpClientErrorException create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, @Nullable Charset charset)
HttpClientErrorException or an HTTP status specific sub-class.public static HttpClientErrorException create(@Nullable String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, @Nullable Charset charset)
create(HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message.