java.lang.Object | ||||||
↳ | java.lang.Throwable | |||||
↳ | java.lang.Exception | |||||
↳ | java.lang.RuntimeException | |||||
↳ | org.springframework.core.NestedRuntimeException | |||||
↳ | org.springframework.web.client.RestClientException | |||||
↳ | org.springframework.web.client.HttpStatusCodeException |
Known Direct Subclasses |
Abstract base class for exceptions based on an HttpStatus
.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new instance of
HttpStatusCodeException based on a HttpStatus . | |||||||||||
Construct a new instance of
HttpStatusCodeException based on a HttpStatus and status text. | |||||||||||
Construct a new instance of
HttpStatusCodeException based on a HttpStatus , status text, and
response body content. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the response body as a byte array.
| |||||||||||
Returns the response body as a string.
| |||||||||||
Returns the HTTP status code.
| |||||||||||
Returns the HTTP status text.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.NestedRuntimeException
| |||||||||||
From class
java.lang.Throwable
| |||||||||||
From class
java.lang.Object
|
Construct a new instance of HttpStatusCodeException
based on a HttpStatus
.
statusCode | the status code |
---|
Construct a new instance of HttpStatusCodeException
based on a HttpStatus
and status text.
statusCode | the status code |
---|---|
statusText | the status text |
Construct a new instance of HttpStatusCodeException
based on a HttpStatus
, status text, and
response body content.
statusCode | the status code |
---|---|
statusText | the status text |
responseBody | the response body content, may be null |
responseCharset | the response body charset, may be null |
Returns the response body as a byte array.