Uses of Class
org.springframework.http.ResponseEntity
Package
Description
Contains a basic abstraction over client/server-side HTTP.
Core package of the client-side web support.
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive
reactive HTTP adapter layer.Classes supporting the
org.springframework.web.reactive.function.client
package.MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package.SockJS client implementation of
WebSocketClient
.-
Uses of ResponseEntity in org.springframework.http
Modifier and TypeMethodDescription<T> ResponseEntity<T>
ResponseEntity.BodyBuilder.body
(T body) Set the body of the response entity and returns it.<T> ResponseEntity<T>
ResponseEntity.HeadersBuilder.build()
Build the response entity with no body.static <T> ResponseEntity<T>
A shortcut for creating aResponseEntity
with the given body and the OK status, or an empty body and a NOT FOUND status in case of an Optional.empty() parameter.static <T> ResponseEntity<T>
ResponseEntity.ok
(T body) A shortcut for creating aResponseEntity
with the given body and the status set to OK. -
Uses of ResponseEntity in org.springframework.web.client
Modifier and TypeMethodDescription<T> ResponseEntity<T>
RestOperations.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String, ?> uriVariables) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String, ?> uriVariables) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(RequestEntity<?> requestEntity, Class<T> responseType) Execute the request specified in the givenRequestEntity
and return the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.exchange
(RequestEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) Execute the request specified in the givenRequestEntity
and return the response asResponseEntity
.<T> ResponseEntity<T>
RestTemplate.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) <T> ResponseEntity<T>
RestTemplate.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String, ?> uriVariables) <T> ResponseEntity<T>
RestTemplate.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables) <T> ResponseEntity<T>
RestTemplate.exchange
(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String, ?> uriVariables) <T> ResponseEntity<T>
RestTemplate.exchange
(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType) <T> ResponseEntity<T>
RestTemplate.exchange
(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) <T> ResponseEntity<T>
RestTemplate.exchange
(RequestEntity<?> entity, Class<T> responseType) <T> ResponseEntity<T>
RestTemplate.exchange
(RequestEntity<?> entity, ParameterizedTypeReference<T> responseType) <T> ResponseEntity<T>
RestOperations.getForEntity
(String url, Class<T> responseType, Object... uriVariables) Retrieve an entity by doing a GET on the specified URL.<T> ResponseEntity<T>
RestOperations.getForEntity
(String url, Class<T> responseType, Map<String, ?> uriVariables) Retrieve a representation by doing a GET on the URI template.<T> ResponseEntity<T>
RestOperations.getForEntity
(URI url, Class<T> responseType) Retrieve a representation by doing a GET on the URL .<T> ResponseEntity<T>
RestTemplate.getForEntity
(String url, Class<T> responseType, Object... uriVariables) <T> ResponseEntity<T>
RestTemplate.getForEntity
(String url, Class<T> responseType, Map<String, ?> uriVariables) <T> ResponseEntity<T>
RestTemplate.getForEntity
(URI url, Class<T> responseType) <T> ResponseEntity<T>
RestOperations.postForEntity
(String url, Object request, Class<T> responseType, Object... uriVariables) Create a new resource by POSTing the given object to the URI template, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations.postForEntity
(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables) Create a new resource by POSTing the given object to the URI template, and returns the response asHttpEntity
.<T> ResponseEntity<T>
RestOperations.postForEntity
(URI url, Object request, Class<T> responseType) Create a new resource by POSTing the given object to the URL, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestTemplate.postForEntity
(String url, Object request, Class<T> responseType, Object... uriVariables) <T> ResponseEntity<T>
RestTemplate.postForEntity
(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables) <T> ResponseEntity<T>
RestTemplate.postForEntity
(URI url, Object request, Class<T> responseType) Modifier and TypeMethodDescription<T> ResponseExtractor<ResponseEntity<T>>
RestTemplate.responseEntityExtractor
(Type responseType) Return aResponseExtractor
that prepares aResponseEntity
. -
Uses of ResponseEntity in org.springframework.web.reactive.function.client
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ResponseEntity<Void>>
ClientResponse.toBodilessEntity()
Return this response as a delayedResponseEntity
containing status and headers, but no body.reactor.core.publisher.Mono<ResponseEntity<Void>>
WebClient.ResponseSpec.toBodilessEntity()
Return aResponseEntity
without a body.<T> reactor.core.publisher.Mono<ResponseEntity<T>>
Return this response as a delayedResponseEntity
.<T> reactor.core.publisher.Mono<ResponseEntity<T>>
ClientResponse.toEntity
(ParameterizedTypeReference<T> bodyTypeReference) Return this response as a delayedResponseEntity
.<T> reactor.core.publisher.Mono<ResponseEntity<T>>
Return aResponseEntity
with the body decoded to an Object of the given type.<T> reactor.core.publisher.Mono<ResponseEntity<T>>
WebClient.ResponseSpec.toEntity
(ParameterizedTypeReference<T> bodyTypeReference) Variant ofWebClient.ResponseSpec.bodyToMono(Class)
with aParameterizedTypeReference
.<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>
WebClient.ResponseSpec.toEntityFlux
(Class<T> elementType) Return aResponseEntity
with the body decoded to aFlux
of elements of the given type.<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>
WebClient.ResponseSpec.toEntityFlux
(ParameterizedTypeReference<T> elementTypeReference) Variant ofWebClient.ResponseSpec.toEntityFlux(Class)
with aParameterizedTypeReference
.<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>
WebClient.ResponseSpec.toEntityFlux
(BodyExtractor<reactor.core.publisher.Flux<T>, ? super ClientHttpResponse> bodyExtractor) Variant ofWebClient.ResponseSpec.toEntityFlux(Class)
with aBodyExtractor
.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
ClientResponse.toEntityList
(Class<T> elementClass) Return this response as a delayed list ofResponseEntity
s.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
ClientResponse.toEntityList
(ParameterizedTypeReference<T> elementTypeRef) Return this response as a delayed list ofResponseEntity
s.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
WebClient.ResponseSpec.toEntityList
(Class<T> elementClass) Return aResponseEntity
with the body decoded to aList
of elements of the given type.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
WebClient.ResponseSpec.toEntityList
(ParameterizedTypeReference<T> elementTypeRef) Variant ofWebClient.ResponseSpec.toEntity(Class)
with aParameterizedTypeReference
. -
Uses of ResponseEntity in org.springframework.web.reactive.function.client.support
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ResponseEntity<Void>>
ClientResponseWrapper.toBodilessEntity()
<T> reactor.core.publisher.Mono<ResponseEntity<T>>
<T> reactor.core.publisher.Mono<ResponseEntity<T>>
ClientResponseWrapper.toEntity
(ParameterizedTypeReference<T> bodyTypeReference) <T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
ClientResponseWrapper.toEntityList
(Class<T> elementClass) <T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>
ClientResponseWrapper.toEntityList
(ParameterizedTypeReference<T> elementTypeRef) -
Uses of ResponseEntity in org.springframework.web.servlet.mvc.method.annotation
Modifier and TypeMethodDescriptionprotected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleAsyncRequestTimeoutException
(AsyncRequestTimeoutException ex, HttpHeaders headers, HttpStatus status, WebRequest webRequest) Customize the response for AsyncRequestTimeoutException.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.final ResponseEntity<Object>
ResponseEntityExceptionHandler.handleException
(Exception ex, WebRequest request) Provides handling for standard Spring MVC exceptions.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.handleMissingPathVariable
(MissingPathVariableException ex, HttpHeaders headers, HttpStatus status, WebRequest request) Customize the response for MissingPathVariableException.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.handleNoHandlerFoundException
(NoHandlerFoundException ex, HttpHeaders headers, HttpStatus status, WebRequest request) Customize the response for NoHandlerFoundException.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. -
Uses of ResponseEntity in org.springframework.web.socket.sockjs.client
Modifier and TypeMethodDescriptionprotected abstract ResponseEntity<String>
AbstractXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
JettyXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
RestTemplateXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
UndertowXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
JettyXhrTransport.executeRequest
(URI url, org.eclipse.jetty.http.HttpMethod method, HttpHeaders headers, String body) protected ResponseEntity<String>
UndertowXhrTransport.executeRequest
(URI url, io.undertow.util.HttpString method, HttpHeaders headers, String body) protected abstract ResponseEntity<String>
AbstractXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) JettyXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) RestTemplateXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) protected ResponseEntity<String>
UndertowXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message)