# Uses of Interface
org.springframework.http.HttpStatusCode

Packages that use HttpStatusCode
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
Common, generic interfaces that define minimal boundary points between Spring's web infrastructure and other framework modules.
org.springframework.web.bind
Provides web-specific data binding functionality.
org.springframework.web.client
Core package of the client-side web support.
org.springframework.web.context.request.async
Support for asynchronous request processing.
org.springframework.web.filter
Provides generic filter base classes allowing for bean-style configuration.
org.springframework.web.filter.reactive
`WebFilter` implementations for use in reactive web applications.
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.multipart
Multipart resolution framework for handling file uploads.
org.springframework.web.multipart.support
Support classes for the multipart resolution framework.
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`.

## Uses of HttpStatusCode in org.springframework.http

Classes in org.springframework.http that implement HttpStatusCode
Modifier and Type
Class
Description
`enum`
`HttpStatus`
Enumeration of HTTP status codes.
Methods in org.springframework.http that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
ResponseEntity.`getStatusCode()`
Return the HTTP status code of the response.
`static HttpStatusCode`
HttpStatusCode.`valueOf(int code)`
Return an `HttpStatusCode` object for the given integer value.
Methods in org.springframework.http with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`static ProblemDetail`
ProblemDetail.`forStatus(HttpStatusCode status)`
Create a `ProblemDetail` instance with the given status code.
`static ProblemDetail`
ProblemDetail.`forStatusAndDetail(HttpStatusCode status, String detail)`
Create a `ProblemDetail` instance with the given status and detail.
`default boolean`
HttpStatusCode.`isSameCodeAs(HttpStatusCode other)`
Whether this `HttpStatusCode` shares the same integer `value` as the other status code.
`static ResponseEntity.BodyBuilder`
ResponseEntity.`status(HttpStatusCode status)`
Create a builder with the given status.
Constructors in org.springframework.http with parameters of type HttpStatusCode
Modifier
Constructor
Description
``
`ResponseEntity(HttpStatusCode status)`
Create a `ResponseEntity` with a status code only.
``
`ResponseEntity(org.springframework.util.MultiValueMap<String,String> headers, HttpStatusCode status)`
Create a `ResponseEntity` with headers and a status code.
``
`ResponseEntity(T body, HttpStatusCode status)`
Create a `ResponseEntity` with a body and status code.
``
`ResponseEntity(T body, org.springframework.util.MultiValueMap<String,String> headers, HttpStatusCode statusCode)`
Create a `ResponseEntity` with a body, headers, and a status code.

## Uses of HttpStatusCode in org.springframework.http.client

Methods in org.springframework.http.client that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
ClientHttpResponse.`getStatusCode()`
Get the HTTP status code as an `HttpStatusCode`.

## Uses of HttpStatusCode in org.springframework.http.client.reactive

Methods in org.springframework.http.client.reactive that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
AbstractClientHttpResponse.`getStatusCode()`
`HttpStatusCode`
ClientHttpResponse.`getStatusCode()`
Return the HTTP status code as an `HttpStatusCode`.
`HttpStatusCode`
ClientHttpResponseDecorator.`getStatusCode()`
Constructors in org.springframework.http.client.reactive with parameters of type HttpStatusCode
Modifier
Constructor
Description
`protected`
`AbstractClientHttpResponse(HttpStatusCode statusCode, HttpHeaders headers, org.springframework.util.MultiValueMap<String,ResponseCookie> cookies, reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> body)`

## Uses of HttpStatusCode in org.springframework.http.server

Methods in org.springframework.http.server with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`void`
DelegatingServerHttpResponse.`setStatusCode(HttpStatusCode status)`
`void`
ServerHttpResponse.`setStatusCode(HttpStatusCode status)`
Set the HTTP status code of the response.
`void`
ServletServerHttpResponse.`setStatusCode(HttpStatusCode status)`

## Uses of HttpStatusCode in org.springframework.http.server.reactive

Methods in org.springframework.http.server.reactive that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
AbstractServerHttpResponse.`getStatusCode()`
`HttpStatusCode`
ServerHttpResponse.`getStatusCode()`
Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.
`HttpStatusCode`
ServerHttpResponseDecorator.`getStatusCode()`
Methods in org.springframework.http.server.reactive with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`boolean`
AbstractServerHttpResponse.`setStatusCode(HttpStatusCode status)`
`boolean`
ServerHttpResponse.`setStatusCode(HttpStatusCode status)`
Set the HTTP status code of the response.
`boolean`
ServerHttpResponseDecorator.`setStatusCode(HttpStatusCode status)`

## Uses of HttpStatusCode in org.springframework.web

Methods in org.springframework.web that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
ErrorResponse.`getStatusCode()`
Return the HTTP status code to use for the response.
`HttpStatusCode`
ErrorResponseException.`getStatusCode()`
`HttpStatusCode`
HttpMediaTypeNotAcceptableException.`getStatusCode()`
`HttpStatusCode`
HttpMediaTypeNotSupportedException.`getStatusCode()`
`HttpStatusCode`
HttpRequestMethodNotSupportedException.`getStatusCode()`
Methods in org.springframework.web with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`static ErrorResponse.Builder`
ErrorResponse.`builder(Throwable ex, HttpStatusCode statusCode, String detail)`
Return a builder to create an `ErrorResponse` instance.
`static ErrorResponse`
ErrorResponse.`create(Throwable ex, HttpStatusCode statusCode, String detail)`
Static factory method to build an instance via `ErrorResponse.builder(Throwable, HttpStatusCode, String)`.
Constructors in org.springframework.web with parameters of type HttpStatusCode
Modifier
Constructor
Description
``
`ErrorResponseException(HttpStatusCode status)`
Constructor with an `HttpStatusCode`.
``
`ErrorResponseException(HttpStatusCode status, Throwable cause)`
Constructor with an `HttpStatusCode` and an optional cause.
``
`ErrorResponseException(HttpStatusCode status, ProblemDetail body, Throwable cause)`
Constructor with a given `ProblemDetail` instance, possibly a subclass of `ProblemDetail` with extended fields.
``
`ErrorResponseException(HttpStatusCode status, ProblemDetail body, Throwable cause, String messageDetailCode, Object[] messageDetailArguments)`
Constructor with a given `ProblemDetail`, and a `MessageSource` code and arguments to resolve the detail message with.

## Uses of HttpStatusCode in org.springframework.web.bind

Methods in org.springframework.web.bind that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
MethodArgumentNotValidException.`getStatusCode()`
`HttpStatusCode`
MissingPathVariableException.`getStatusCode()`
`HttpStatusCode`
ServletRequestBindingException.`getStatusCode()`

## Uses of HttpStatusCode in org.springframework.web.client

Methods in org.springframework.web.client that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
RestClientResponseException.`getStatusCode()`
Return the HTTP status code.
`HttpStatusCode`
UnknownContentTypeException.`getStatusCode()`
Return the HTTP status code value.
Methods in org.springframework.web.client with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`static HttpClientErrorException`
HttpClientErrorException.`create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Variant of `HttpClientErrorException.create(HttpStatusCode, String, HttpHeaders, byte[], Charset)` with an optional prepared message.
`static HttpClientErrorException`
HttpClientErrorException.`create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Create `HttpClientErrorException` or an HTTP status specific subclass.
`static HttpServerErrorException`
HttpServerErrorException.`create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Variant of `HttpServerErrorException.create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset)` with an optional prepared message.
`static HttpServerErrorException`
HttpServerErrorException.`create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Create an `HttpServerErrorException` or an HTTP status specific subclass.
`protected void`
DefaultResponseErrorHandler.`handleError(ClientHttpResponse response, HttpStatusCode statusCode, URI url, HttpMethod method)`
Handle the error based on the resolved status code.
`protected void`
ExtractingResponseErrorHandler.`handleError(ClientHttpResponse response, HttpStatusCode statusCode, URI url, HttpMethod method)`
`protected boolean`
DefaultResponseErrorHandler.`hasError(HttpStatusCode statusCode)`
Template method called from `DefaultResponseErrorHandler.hasError(ClientHttpResponse)`.
`protected boolean`
ExtractingResponseErrorHandler.`hasError(HttpStatusCode statusCode)`
Method parameters in org.springframework.web.client with type arguments of type HttpStatusCode
Modifier and Type
Method
Description
`RestClient.Builder`
RestClient.Builder.`defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler)`
Register a default status handler to apply to every response.
`RestClient.ResponseSpec`
RestClient.ResponseSpec.`onStatus(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler)`
Provide a function to map specific error status codes to an error handler.
`void`
ExtractingResponseErrorHandler.`setStatusMapping(Map<HttpStatusCode,Class<? extends RestClientException>> statusMapping)`
Set the mapping from HTTP status code to `RestClientException` subclass.
Constructors in org.springframework.web.client with parameters of type HttpStatusCode
Modifier
Constructor
Description
``
`HttpClientErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset)`
Constructor with a status code and status text, headers, and content, and a prepared message.
``
`HttpClientErrorException(HttpStatusCode statusCode)`
Constructor with a status code only.
``
`HttpClientErrorException(HttpStatusCode statusCode, String statusText)`
Constructor with a status code and status text.
``
`HttpClientErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset responseCharset)`
Constructor with a status code and status text, and content.
``
`HttpClientErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset)`
Constructor with a status code and status text, headers, and content.
``
`HttpServerErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Constructor with a status code and status text, headers, content, and a prepared message.
``
`HttpServerErrorException(HttpStatusCode statusCode)`
Constructor with a status code only.
``
`HttpServerErrorException(HttpStatusCode statusCode, String statusText)`
Constructor with a status code and status text.
``
`HttpServerErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset charset)`
Constructor with a status code and status text, and content.
``
`HttpServerErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)`
Constructor with a status code and status text, headers, and content.
`protected`
`HttpStatusCodeException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)`
Construct instance with an `HttpStatusCode`, status text, content, and a response charset.
`protected`
`HttpStatusCodeException(HttpStatusCode statusCode)`
Construct a new instance with an `HttpStatusCode`.
`protected`
`HttpStatusCodeException(HttpStatusCode statusCode, String statusText)`
Construct a new instance with an `HttpStatusCode` and status text.
`protected`
`HttpStatusCodeException(HttpStatusCode statusCode, String statusText, byte[] responseBody, Charset responseCharset)`
Construct instance with an `HttpStatusCode`, status text, and content.
`protected`
`HttpStatusCodeException(HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)`
Construct instance with an `HttpStatusCode`, status text, content, and a response charset.
``
`RestClientResponseException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset)`
Construct a new instance of with the given response data.
``
`UnknownContentTypeException(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody)`
Construct a new instance of with the given response data.

## Uses of HttpStatusCode in org.springframework.web.context.request.async

Methods in org.springframework.web.context.request.async that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
AsyncRequestTimeoutException.`getStatusCode()`

## Uses of HttpStatusCode in org.springframework.web.filter

Methods in org.springframework.web.filter that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
RelativeRedirectFilter.`getRedirectStatus()`
Return the configured redirect status.
Methods in org.springframework.web.filter with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`void`
RelativeRedirectFilter.`setRedirectStatus(HttpStatusCode status)`
Set the default HTTP Status to use for redirects.

## Uses of HttpStatusCode in org.springframework.web.filter.reactive

Methods in org.springframework.web.filter.reactive with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`UrlHandlerFilter.Builder`
UrlHandlerFilter.Builder.TrailingSlashSpec.`redirect(HttpStatusCode statusCode)`
Handle requests by sending a redirect to the same URL but the trailing slash trimmed.

## Uses of HttpStatusCode in org.springframework.web.method

Methods in org.springframework.web.method that return HttpStatusCode
Modifier and Type
Method
Description
`protected HttpStatusCode`
HandlerMethod.`getResponseStatus()`
Return the specified response status, if any.

## Uses of HttpStatusCode in org.springframework.web.method.support

Methods in org.springframework.web.method.support that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
ModelAndViewContainer.`getStatus()`
Return the configured HTTP status, if any.
Methods in org.springframework.web.method.support with parameters of type HttpStatusCode
Modifier and Type
Method
Description
`void`
ModelAndViewContainer.`setStatus(HttpStatusCode status)`
Provide an HTTP status that will be passed on to with the `ModelAndView` used for view rendering purposes.

## Uses of HttpStatusCode in org.springframework.web.multipart

Methods in org.springframework.web.multipart that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
MaxUploadSizeExceededException.`getStatusCode()`

## Uses of HttpStatusCode in org.springframework.web.multipart.support

Methods in org.springframework.web.multipart.support that return HttpStatusCode
Modifier and Type
Method
Description
`HttpStatusCode`
MissingServletRequestPartException.`getStatusCode()`
Return the HTTP status code to use for the response.

## Uses of HttpStatusCode in org.springframework.web.server

Constructors in org.springframework.web.server with parameters of type HttpStatusCode
Modifier
Constructor
Description
``
`ResponseStatusException(HttpStatusCode status)`
Constructor with a response status.
``
`ResponseStatusException(HttpStatusCode status, String reason)`
Constructor with a response status and a reason to add to the exception message as explanation.
``
`ResponseStatusException(HttpStatusCode 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.
`protected`
`ResponseStatusException(HttpStatusCode status, String reason, Throwable cause, String messageDetailCode, Object[] messageDetailArguments)`
Constructor with a message code and arguments for resolving the error "detail" via `MessageSource`.

## Uses of HttpStatusCode in org.springframework.web.server.handler

Methods in org.springframework.web.server.handler that return HttpStatusCode
Modifier and Type
Method
Description
`protected HttpStatusCode`
ResponseStatusExceptionHandler.`determineStatus(Throwable ex)`
Determine the HTTP status for the given exception.