Package | Description |
---|---|
org.springframework.http |
Contains a basic abstraction over client/server-side HTTP.
|
org.springframework.http.client |
Contains an abstraction over client-side HTTP.
|
org.springframework.http.client.reactive |
Abstractions for reactive HTTP client support including
ClientHttpRequest and
ClientHttpResponse as well as a
ClientHttpConnector . |
org.springframework.http.server |
Contains an abstraction over server-side HTTP.
|
org.springframework.http.server.reactive |
Abstractions for reactive HTTP server support including a
ServerHttpRequest and
ServerHttpResponse along with an
HttpHandler for processing. |
org.springframework.web.client |
Core package of the client-side web support.
|
org.springframework.web.filter |
Provides generic filter base classes allowing for bean-style configuration.
|
org.springframework.web.method |
Common infrastructure for handler method processing, as used by
Spring MVC's
org.springframework.web.servlet.mvc.method package. |
org.springframework.web.method.support |
Generic support classes for handler method processing.
|
org.springframework.web.server |
Core interfaces and classes for Spring's generic, reactive web support.
|
org.springframework.web.server.handler |
Provides common WebHandler implementations and a
WebHandlerDecorator . |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ResponseEntity.getStatusCode()
Return the HTTP status code of the response.
|
static HttpStatus |
HttpStatus.resolve(int statusCode)
Resolve the given status code to an
HttpStatus , if possible. |
static HttpStatus |
HttpStatus.valueOf(int statusCode)
Return the
HttpStatus enum constant with the specified numeric value. |
static HttpStatus |
HttpStatus.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpStatus[] |
HttpStatus.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static ResponseEntity.BodyBuilder |
ResponseEntity.status(HttpStatus status)
Create a builder with the given status.
|
static HttpStatus.Series |
HttpStatus.Series.valueOf(HttpStatus status)
Deprecated.
as of 5.3, in favor of invoking
series() directly |
Constructor and Description |
---|
ResponseEntity(HttpStatus status)
Create a
ResponseEntity with a status code only. |
ResponseEntity(org.springframework.util.MultiValueMap<String,String> headers,
HttpStatus status)
Create a
ResponseEntity with headers and a status code. |
ResponseEntity(T body,
HttpStatus status)
Create a
ResponseEntity with a body and status code. |
ResponseEntity(T body,
org.springframework.util.MultiValueMap<String,String> headers,
HttpStatus status)
Create a
ResponseEntity with a body, headers, and a status code. |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ClientHttpResponse.getStatusCode()
Get the HTTP status code as an
HttpStatus enum value. |
HttpStatus |
AbstractClientHttpResponse.getStatusCode() |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ClientHttpResponseDecorator.getStatusCode() |
HttpStatus |
ClientHttpResponse.getStatusCode()
Return the HTTP status code as an
HttpStatus enum value. |
Modifier and Type | Method and Description |
---|---|
void |
ServletServerHttpResponse.setStatusCode(HttpStatus status) |
void |
DelegatingServerHttpResponse.setStatusCode(HttpStatus status) |
void |
ServerHttpResponse.setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
Modifier and Type | Method and Description |
---|---|
HttpStatus |
AbstractServerHttpResponse.getStatusCode() |
HttpStatus |
ServerHttpResponseDecorator.getStatusCode() |
HttpStatus |
ServerHttpResponse.getStatusCode()
Return the status code that has been set, or otherwise fall back on the
status of the response from the underlying server.
|
Modifier and Type | Method and Description |
---|---|
boolean |
AbstractServerHttpResponse.setStatusCode(HttpStatus status) |
boolean |
ServerHttpResponseDecorator.setStatusCode(HttpStatus status) |
boolean |
ServerHttpResponse.setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
Modifier and Type | Method and Description |
---|---|
protected HttpStatus |
DefaultResponseErrorHandler.getHttpStatusCode(ClientHttpResponse response)
Deprecated.
as of 5.0, in favor of
DefaultResponseErrorHandler.handleError(ClientHttpResponse, HttpStatus) |
HttpStatus |
HttpStatusCodeException.getStatusCode()
Return the HTTP status code.
|
Modifier and Type | Method and Description |
---|---|
static HttpClientErrorException |
HttpClientErrorException.create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create
HttpClientErrorException or an HTTP status specific subclass. |
static HttpServerErrorException |
HttpServerErrorException.create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create an
HttpServerErrorException or an HTTP status specific subclass. |
static HttpClientErrorException |
HttpClientErrorException.create(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Variant of
HttpClientErrorException.create(HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message. |
static HttpServerErrorException |
HttpServerErrorException.create(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Variant of
HttpServerErrorException.create(String, HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message. |
void |
ExtractingResponseErrorHandler.handleError(ClientHttpResponse response,
HttpStatus statusCode) |
protected void |
DefaultResponseErrorHandler.handleError(ClientHttpResponse response,
HttpStatus statusCode)
Handle the error based on the resolved status code.
|
protected boolean |
ExtractingResponseErrorHandler.hasError(HttpStatus statusCode) |
protected boolean |
DefaultResponseErrorHandler.hasError(HttpStatus statusCode)
Template method called from
DefaultResponseErrorHandler.hasError(ClientHttpResponse) . |
Modifier and Type | Method and Description |
---|---|
void |
ExtractingResponseErrorHandler.setStatusMapping(Map<HttpStatus,Class<? extends RestClientException>> statusMapping)
Set the mapping from HTTP status code to
RestClientException subclass. |
Constructor and Description |
---|
HttpClientErrorException(HttpStatus statusCode)
Constructor with a status code only.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Constructor with a status code and status text.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, and content.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content.
|
HttpClientErrorException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content,
and a prepared message.
|
HttpServerErrorException(HttpStatus statusCode)
Constructor with a status code only.
|
HttpServerErrorException(HttpStatus statusCode,
String statusText)
Constructor with a status code and status text.
|
HttpServerErrorException(HttpStatus statusCode,
String statusText,
byte[] body,
Charset charset)
Constructor with a status code and status text, and content.
|
HttpServerErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Constructor with a status code and status text, headers, and content.
|
HttpServerErrorException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Constructor with a status code and status text, headers, content, and a
prepared message.
|
HttpStatusCodeException(HttpStatus statusCode)
Construct a new instance with an
HttpStatus . |
HttpStatusCodeException(HttpStatus statusCode,
String statusText)
Construct a new instance with an
HttpStatus and status text. |
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct instance with an
HttpStatus , status text, and content. |
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct instance with an
HttpStatus , status text, content, and
a response charset. |
HttpStatusCodeException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct instance with an
HttpStatus , status text, content, and
a response charset. |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
RelativeRedirectFilter.getRedirectStatus()
Return the configured redirect status.
|
Modifier and Type | Method and Description |
---|---|
void |
RelativeRedirectFilter.setRedirectStatus(HttpStatus status)
Set the default HTTP Status to use for redirects.
|
Modifier and Type | Method and Description |
---|---|
protected HttpStatus |
HandlerMethod.getResponseStatus()
Return the specified response status, if any.
|
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ModelAndViewContainer.getStatus()
Return the configured HTTP status, if any.
|
Modifier and Type | Method and Description |
---|---|
void |
ModelAndViewContainer.setStatus(HttpStatus status)
Provide an HTTP status that will be passed on to with the
ModelAndView used for view rendering purposes. |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ResponseStatusException.getStatus()
Return the HTTP status associated with this exception.
|
Constructor and Description |
---|
ResponseStatusException(HttpStatus status)
Constructor with a response status.
|
ResponseStatusException(HttpStatus status,
String reason)
Constructor with a response status and a reason to add to the exception
message as explanation.
|
ResponseStatusException(HttpStatus status,
String reason,
Throwable cause)
Constructor with a response status and a reason to add to the exception
message as explanation, as well as a nested exception.
|
Modifier and Type | Method and Description |
---|---|
protected HttpStatus |
ResponseStatusExceptionHandler.determineStatus(Throwable ex)
Deprecated.
as of 5.3 in favor of
ResponseStatusExceptionHandler.determineRawStatusCode(Throwable) . |