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.mock.http.client |
Mock implementations of client-side HTTP abstractions.
|
org.springframework.test.web.client.response |
Contains built-in
ResponseCreator
implementations. |
org.springframework.web.client |
Core package of the client-side web support.
|
org.springframework.web.servlet.mvc.method.annotation |
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation package. |
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.
|
Modifier and Type | Method and Description |
---|---|
static HttpStatus.Series |
HttpStatus.Series.valueOf(HttpStatus status) |
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 |
ClientHttpResponse.getStatusCode()
Return the HTTP status code of the response.
|
HttpStatus |
AbstractClientHttpResponse.getStatusCode() |
Modifier and Type | Method and Description |
---|---|
void |
ServletServerHttpResponse.setStatusCode(HttpStatus status) |
void |
ServerHttpResponse.setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
Modifier and Type | Method and Description |
---|---|
HttpStatus |
MockClientHttpResponse.getStatusCode() |
Constructor and Description |
---|
MockClientHttpResponse(byte[] body,
HttpStatus statusCode)
Constructor with response body as a byte array.
|
MockClientHttpResponse(InputStream body,
HttpStatus statusCode)
Constructor with response body as InputStream.
|
Modifier and Type | Method and Description |
---|---|
static DefaultResponseCreator |
MockRestResponseCreators.withStatus(HttpStatus status)
ResponseCreator with a specific HTTP status. |
Constructor and Description |
---|
DefaultResponseCreator(HttpStatus statusCode)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
HttpStatus |
HttpStatusCodeException.getStatusCode()
Return 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 an
HttpStatus . |
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus and status text. |
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus , status text, and response body content. |
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on an
HttpStatus , status text, and response body content. |
HttpServerErrorException(HttpStatus statusCode)
Construct a new instance of
HttpServerErrorException based on an
HttpStatus . |
HttpServerErrorException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpServerErrorException based on an
HttpStatus and status text. |
HttpServerErrorException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpServerErrorException based on an
HttpStatus , status text, and response body content. |
HttpServerErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
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 an
HttpStatus . |
HttpStatusCodeException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus and status text. |
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus , status text, and response body content. |
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus , status text, and response body content. |
Modifier and Type | Method and Description |
---|---|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleBindException(BindException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for BindException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleConversionNotSupported(ConversionNotSupportedException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for ConversionNotSupportedException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleExceptionInternal(Exception ex,
Object body,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
A single place to customize the response body of all Exception types.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for HttpMediaTypeNotAcceptableException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for HttpMediaTypeNotSupportedException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleHttpMessageNotReadable(HttpMessageNotReadableException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for HttpMessageNotReadableException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleHttpMessageNotWritable(HttpMessageNotWritableException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for HttpMessageNotWritableException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for HttpRequestMethodNotSupportedException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleMethodArgumentNotValid(MethodArgumentNotValidException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for MethodArgumentNotValidException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleMissingServletRequestParameter(MissingServletRequestParameterException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for MissingServletRequestParameterException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleMissingServletRequestPart(MissingServletRequestPartException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for MissingServletRequestPartException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleNoSuchRequestHandlingMethod(NoSuchRequestHandlingMethodException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for NoSuchRequestHandlingMethodException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleServletRequestBindingException(ServletRequestBindingException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for ServletRequestBindingException.
|
protected ResponseEntity<Object> |
ResponseEntityExceptionHandler.handleTypeMismatch(TypeMismatchException ex,
HttpHeaders headers,
HttpStatus status,
WebRequest request)
Customize the response for TypeMismatchException.
|
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.