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, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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 nullresponseBody - the response body content, may be nullresponseCharset - the response body charset, may be nullpublic int getRawStatusCode()
public String getStatusText()
public HttpHeaders getResponseHeaders()
public byte[] getResponseBodyAsByteArray()
public String getResponseBodyAsString()