public class WebClientResponseException extends WebClientException
| Constructor and Description |
|---|
WebClientResponseException(java.lang.String message,
int statusCode,
java.lang.String statusText,
HttpHeaders headers,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of with the given response data.
|
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
getHeaders()
Return the HTTP response headers.
|
int |
getRawStatusCode()
Return the raw HTTP status code value.
|
byte[] |
getResponseBodyAsByteArray()
Return the response body as a byte array.
|
java.lang.String |
getResponseBodyAsString()
Return the response body as a string.
|
HttpStatus |
getStatusCode()
Return the HTTP status code value.
|
java.lang.String |
getStatusText()
Return the HTTP status text.
|
contains, getMessage, getMostSpecificCause, getRootCausepublic WebClientResponseException(java.lang.String message,
int statusCode,
java.lang.String statusText,
@Nullable
HttpHeaders headers,
@Nullable
byte[] responseBody,
@Nullable
java.nio.charset.Charset responseCharset)
statusCode - the raw status code valuestatusText - the status textheaders - the response headers (may be null)responseBody - the response body content (may be null)responseCharset - the response body charset (may be null)public HttpStatus getStatusCode()
public int getRawStatusCode()
public java.lang.String getStatusText()
public HttpHeaders getHeaders()
public byte[] getResponseBodyAsByteArray()
public java.lang.String getResponseBodyAsString()