Uses of Interface
org.springframework.http.HttpStatusCode
Packages that use HttpStatusCode
Package
Description
Contains a basic abstraction over client/server-side HTTP.
Contains an abstraction over client-side HTTP.
Abstractions for reactive HTTP client support including
ClientHttpRequest and
ClientHttpResponse as well as a
ClientHttpConnector.Contains an abstraction over server-side HTTP.
Abstractions for reactive HTTP server support including a
ServerHttpRequest and
ServerHttpResponse along with an
HttpHandler for processing.Common, generic interfaces that define minimal boundary points
between Spring's web infrastructure and other framework modules.
Provides web-specific data binding functionality.
Core package of the client-side web support.
Support for asynchronous request processing.
Provides generic filter base classes allowing for bean-style configuration.
WebFilter implementations for use in
reactive web applications.Common infrastructure for handler method processing, as used by
Spring MVC's
org.springframework.web.servlet.mvc.method package.Generic support classes for handler method processing.
Multipart resolution framework for handling file uploads.
Support classes for the multipart resolution framework.
Core interfaces and classes for Spring's generic, reactive web support.
Provides common WebHandler implementations and a
WebHandlerDecorator.-
Uses of HttpStatusCode in org.springframework.http
Classes in org.springframework.http that implement HttpStatusCodeMethods in org.springframework.http that return HttpStatusCodeModifier and TypeMethodDescriptionResponseEntity.getStatusCode()Return the HTTP status code of the response.static HttpStatusCodeHttpStatusCode.valueOf(int code) Return anHttpStatusCodeobject for the given integer value.Methods in org.springframework.http with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionstatic ProblemDetailProblemDetail.forStatus(HttpStatusCode status) Create aProblemDetailinstance with the given status code.static ProblemDetailProblemDetail.forStatusAndDetail(HttpStatusCode status, String detail) Create aProblemDetailinstance with the given status and detail.default booleanHttpStatusCode.isSameCodeAs(HttpStatusCode other) Whether thisHttpStatusCodeshares the same integervalueas the other status code.static ResponseEntity.BodyBuilderResponseEntity.status(HttpStatusCode status) Create a builder with the given status.Constructors in org.springframework.http with parameters of type HttpStatusCodeModifierConstructorDescriptionResponseEntity(HttpStatusCode status) Create aResponseEntitywith a status code only.ResponseEntity(org.springframework.util.MultiValueMap<String, String> headers, HttpStatusCode status) Create aResponseEntitywith headers and a status code.ResponseEntity(T body, HttpStatusCode status) Create aResponseEntitywith a body and status code.ResponseEntity(T body, org.springframework.util.MultiValueMap<String, String> headers, HttpStatusCode statusCode) Create aResponseEntitywith a body, headers, and a status code. -
Uses of HttpStatusCode in org.springframework.http.client
Methods in org.springframework.http.client that return HttpStatusCodeModifier and TypeMethodDescriptionClientHttpResponse.getStatusCode()Get the HTTP status code as anHttpStatusCode. -
Uses of HttpStatusCode in org.springframework.http.client.reactive
Methods in org.springframework.http.client.reactive that return HttpStatusCodeModifier and TypeMethodDescriptionAbstractClientHttpResponse.getStatusCode()ClientHttpResponse.getStatusCode()Return the HTTP status code as anHttpStatusCode.ClientHttpResponseDecorator.getStatusCode()Constructors in org.springframework.http.client.reactive with parameters of type HttpStatusCodeModifierConstructorDescriptionprotectedAbstractClientHttpResponse(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 HttpStatusCodeModifier and TypeMethodDescriptionvoidDelegatingServerHttpResponse.setStatusCode(HttpStatusCode status) voidServerHttpResponse.setStatusCode(HttpStatusCode status) Set the HTTP status code of the response.voidServletServerHttpResponse.setStatusCode(HttpStatusCode status) -
Uses of HttpStatusCode in org.springframework.http.server.reactive
Methods in org.springframework.http.server.reactive that return HttpStatusCodeModifier and TypeMethodDescriptionAbstractServerHttpResponse.getStatusCode()ServerHttpResponse.getStatusCode()Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.ServerHttpResponseDecorator.getStatusCode()Methods in org.springframework.http.server.reactive with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionbooleanAbstractServerHttpResponse.setStatusCode(HttpStatusCode status) booleanServerHttpResponse.setStatusCode(HttpStatusCode status) Set the HTTP status code of the response.booleanServerHttpResponseDecorator.setStatusCode(HttpStatusCode status) -
Uses of HttpStatusCode in org.springframework.web
Methods in org.springframework.web that return HttpStatusCodeModifier and TypeMethodDescriptionErrorResponse.getStatusCode()Return the HTTP status code to use for the response.ErrorResponseException.getStatusCode()HttpMediaTypeNotAcceptableException.getStatusCode()HttpMediaTypeNotSupportedException.getStatusCode()HttpRequestMethodNotSupportedException.getStatusCode()Methods in org.springframework.web with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionstatic ErrorResponse.BuilderErrorResponse.builder(Throwable ex, HttpStatusCode statusCode, String detail) Return a builder to create anErrorResponseinstance.static ErrorResponseErrorResponse.create(Throwable ex, HttpStatusCode statusCode, String detail) Static factory method to build an instance viaErrorResponse.builder(Throwable, HttpStatusCode, String).Constructors in org.springframework.web with parameters of type HttpStatusCodeModifierConstructorDescriptionErrorResponseException(HttpStatusCode status) Constructor with anHttpStatusCode.ErrorResponseException(HttpStatusCode status, Throwable cause) Constructor with anHttpStatusCodeand an optional cause.ErrorResponseException(HttpStatusCode status, ProblemDetail body, Throwable cause) Constructor with a givenProblemDetailinstance, possibly a subclass ofProblemDetailwith extended fields.ErrorResponseException(HttpStatusCode status, ProblemDetail body, Throwable cause, String messageDetailCode, Object[] messageDetailArguments) Constructor with a givenProblemDetail, and aMessageSourcecode and arguments to resolve the detail message with. -
Uses of HttpStatusCode in org.springframework.web.bind
Methods in org.springframework.web.bind that return HttpStatusCodeModifier and TypeMethodDescriptionMethodArgumentNotValidException.getStatusCode()MissingPathVariableException.getStatusCode()ServletRequestBindingException.getStatusCode() -
Uses of HttpStatusCode in org.springframework.web.client
Methods in org.springframework.web.client that return HttpStatusCodeModifier and TypeMethodDescriptionRestClientResponseException.getStatusCode()Return the HTTP status code.UnknownContentTypeException.getStatusCode()Return the HTTP status code value.Methods in org.springframework.web.client with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionstatic HttpClientErrorExceptionHttpClientErrorException.create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpClientErrorException.create(HttpStatusCode, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpClientErrorExceptionHttpClientErrorException.create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) CreateHttpClientErrorExceptionor an HTTP status specific subclass.static HttpServerErrorExceptionHttpServerErrorException.create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpServerErrorException.create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpServerErrorExceptionHttpServerErrorException.create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Create anHttpServerErrorExceptionor an HTTP status specific subclass.protected voidDefaultResponseErrorHandler.handleError(ClientHttpResponse response, HttpStatusCode statusCode, URI url, HttpMethod method) Handle the error based on the resolved status code.protected voidExtractingResponseErrorHandler.handleError(ClientHttpResponse response, HttpStatusCode statusCode, URI url, HttpMethod method) protected booleanDefaultResponseErrorHandler.hasError(HttpStatusCode statusCode) Template method called fromDefaultResponseErrorHandler.hasError(ClientHttpResponse).protected booleanExtractingResponseErrorHandler.hasError(HttpStatusCode statusCode) Method parameters in org.springframework.web.client with type arguments of type HttpStatusCodeModifier and TypeMethodDescriptionRestClient.Builder.defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) Register a default status handler to apply to every response.RestClient.ResponseSpec.onStatus(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) Provide a function to map specific error status codes to an error handler.voidExtractingResponseErrorHandler.setStatusMapping(Map<HttpStatusCode, Class<? extends RestClientException>> statusMapping) Set the mapping from HTTP status code toRestClientExceptionsubclass.Constructors in org.springframework.web.client with parameters of type HttpStatusCodeModifierConstructorDescriptionHttpClientErrorException(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.protectedHttpStatusCodeException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, status text, content, and a response charset.protectedHttpStatusCodeException(HttpStatusCode statusCode) Construct a new instance with anHttpStatusCode.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText) Construct a new instance with anHttpStatusCodeand status text.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, status text, and content.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, 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 -
Uses of HttpStatusCode in org.springframework.web.filter
Methods in org.springframework.web.filter that return HttpStatusCodeModifier and TypeMethodDescriptionRelativeRedirectFilter.getRedirectStatus()Return the configured redirect status.Methods in org.springframework.web.filter with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionvoidRelativeRedirectFilter.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 HttpStatusCodeModifier and TypeMethodDescriptionUrlHandlerFilter.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 HttpStatusCodeModifier and TypeMethodDescriptionprotected HttpStatusCodeHandlerMethod.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 HttpStatusCodeModifier and TypeMethodDescriptionModelAndViewContainer.getStatus()Return the configured HTTP status, if any.Methods in org.springframework.web.method.support with parameters of type HttpStatusCodeModifier and TypeMethodDescriptionvoidModelAndViewContainer.setStatus(HttpStatusCode status) Provide an HTTP status that will be passed on to with theModelAndViewused for view rendering purposes. -
Uses of HttpStatusCode in org.springframework.web.multipart
Methods in org.springframework.web.multipart that return HttpStatusCode -
Uses of HttpStatusCode in org.springframework.web.multipart.support
Methods in org.springframework.web.multipart.support that return HttpStatusCodeModifier and TypeMethodDescriptionMissingServletRequestPartException.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 HttpStatusCodeModifierConstructorDescriptionConstructor 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.protectedResponseStatusException(HttpStatusCode status, String reason, Throwable cause, String messageDetailCode, Object[] messageDetailArguments) Constructor with a message code and arguments for resolving the error "detail" viaMessageSource. -
Uses of HttpStatusCode in org.springframework.web.server.handler
Methods in org.springframework.web.server.handler that return HttpStatusCodeModifier and TypeMethodDescriptionprotected HttpStatusCodeResponseStatusExceptionHandler.determineStatus(Throwable ex) Determine the HTTP status for the given exception.