public class HttpClientErrorException extends HttpStatusCodeException
DefaultResponseErrorHandler,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
HttpClientErrorException(HttpStatus statusCode)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus. |
HttpClientErrorException(HttpStatus statusCode,
java.lang.String statusText)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus and status text. |
HttpClientErrorException(HttpStatus statusCode,
java.lang.String statusText,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus, status text, and response body content. |
HttpClientErrorException(HttpStatus statusCode,
java.lang.String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus, status text, and response body content. |
getResponseBodyAsByteArray, getResponseBodyAsString, getResponseHeaders, getStatusCode, getStatusTextcontains, getMessage, getMostSpecificCause, getRootCauseprivate static final long serialVersionUID
public HttpClientErrorException(HttpStatus statusCode)
HttpClientErrorException based on an
HttpStatus.statusCode - the status codepublic HttpClientErrorException(HttpStatus statusCode, java.lang.String statusText)
HttpClientErrorException based on an
HttpStatus and status text.statusCode - the status codestatusText - the status textpublic HttpClientErrorException(HttpStatus statusCode, java.lang.String statusText, byte[] responseBody, java.nio.charset.Charset responseCharset)
HttpClientErrorException based on an
HttpStatus, status text, and response body content.statusCode - the status codestatusText - the status textresponseBody - the response body content, may be nullresponseCharset - the response body charset, may be nullpublic HttpClientErrorException(HttpStatus statusCode, java.lang.String statusText, HttpHeaders responseHeaders, byte[] responseBody, java.nio.charset.Charset responseCharset)
HttpClientErrorException based on an
HttpStatus, status text, and response body content.statusCode - the status codestatusText - the status textresponseHeaders - the response headers, may be nullresponseBody - the response body content, may be nullresponseCharset - the response body charset, may be null