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.server |
Contains an abstraction over server-side HTTP.
|
org.springframework.web.client |
Core package of the client-side web support.
|
org.springframework.web.servlet.view |
Provides standard View and ViewResolver implementations,
including abstract base classes for custom implementations.
|
Modifier and Type | Method and Description |
---|---|
HttpStatus |
ResponseEntity.getStatusCode()
Return the HTTP status code of the response.
|
static HttpStatus |
HttpStatus.valueOf(int statusCode)
Return the enum constant of this type 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.
|
Constructor and Description |
---|
ResponseEntity(HttpStatus statusCode)
Create a new
ResponseEntity with the given status code, and no body nor headers. |
ResponseEntity(MultiValueMap<String,String> headers,
HttpStatus statusCode)
Create a new
HttpEntity with the given headers and status code, and no body. |
ResponseEntity(T body,
HttpStatus statusCode)
Create a new
ResponseEntity with the given body and status code, and no headers. |
ResponseEntity(T body,
MultiValueMap<String,String> headers,
HttpStatus statusCode)
Create a new
HttpEntity with the given body, headers, and status code. |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
AbstractClientHttpResponse.getStatusCode() |
HttpStatus |
ClientHttpResponse.getStatusCode()
Return the HTTP status code of the response.
|
Modifier and Type | Method and Description |
---|---|
void |
ServerHttpResponse.setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
void |
ServletServerHttpResponse.setStatusCode(HttpStatus status) |
Modifier and Type | Method and Description |
---|---|
HttpStatus |
HttpStatusCodeException.getStatusCode()
Returns the HTTP status code.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
DefaultResponseErrorHandler.hasError(HttpStatus statusCode)
Template method called from
DefaultResponseErrorHandler.hasError(ClientHttpResponse) . |
Constructor and Description |
---|
HttpClientErrorException(HttpStatus statusCode)
Construct a new instance of
HttpClientErrorException based on a HttpStatus . |
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpClientErrorException based on a HttpStatus and status text. |
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on a HttpStatus , status text, and
response body content. |
HttpServerErrorException(HttpStatus statusCode)
Construct a new instance of
HttpServerErrorException based on a HttpStatus . |
HttpServerErrorException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpServerErrorException based on a HttpStatus and status text. |
HttpServerErrorException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpServerErrorException based on a HttpStatus , status text, and
response body content. |
HttpStatusCodeException(HttpStatus statusCode)
Construct a new instance of
HttpStatusCodeException based on a HttpStatus . |
HttpStatusCodeException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpStatusCodeException based on a HttpStatus and status text. |
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on a HttpStatus , status text, and
response body content. |
Modifier and Type | Method and Description |
---|---|
protected HttpStatus |
RedirectView.getHttp11StatusCode(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String targetUrl)
Determines the status code to use for HTTP 1.1 compatible requests.
|
Modifier and Type | Method and Description |
---|---|
void |
RedirectView.setStatusCode(HttpStatus statusCode)
Set the status code for this view.
|
Copyright © 2015. All Rights Reserved.