public class WebClientResponseException extends WebClientException
| Constructor and Description | 
|---|
| WebClientResponseException(String message,
                          int statusCode,
                          String statusText,
                          HttpHeaders headers,
                          byte[] responseBody,
                          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. | 
| String | getResponseBodyAsString()Return the response body as a string. | 
| HttpStatus | getStatusCode()Return the HTTP status code value. | 
| String | getStatusText()Return the HTTP status text. | 
contains, getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic WebClientResponseException(String message, int statusCode, String statusText, @Nullable HttpHeaders headers, @Nullable byte[] responseBody, @Nullable 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 String getStatusText()
public HttpHeaders getHeaders()
public byte[] getResponseBodyAsByteArray()
public String getResponseBodyAsString()