public class UnknownHttpStatusCodeException extends RestClientException
Constructor and Description |
---|
UnknownHttpStatusCodeException(int rawStatusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus , status text, and response body content. |
Modifier and Type | Method and Description |
---|---|
int |
getRawStatusCode()
Return the raw HTTP status code value.
|
byte[] |
getResponseBodyAsByteArray()
Return the response body as a byte array.
|
String |
getResponseBodyAsString()
Return the response body as a string.
|
HttpHeaders |
getResponseHeaders()
Return the HTTP response headers.
|
String |
getStatusText()
Return the HTTP status text.
|
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public UnknownHttpStatusCodeException(int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)
HttpStatusCodeException
based on an
HttpStatus
, status text, and response body content.rawStatusCode
- the raw status code valuestatusText
- the status textresponseHeaders
- the response headers, may be null
responseBody
- the response body content, may be null
responseCharset
- the response body charset, may be null
public int getRawStatusCode()
public String getStatusText()
public HttpHeaders getResponseHeaders()
public byte[] getResponseBodyAsByteArray()
public String getResponseBodyAsString()