# Uses of Class
org.springframework.http.ResponseEntity

Packages that use ResponseEntity
Package
Description
org.springframework.http
Contains a basic abstraction over client/server-side HTTP.
org.springframework.web.client
Core package of the client-side web support.
org.springframework.web.client.support
Classes supporting the `org.springframework.web.client` package.
org.springframework.web.service.invoker
Support for creating a client proxy for an HTTP service annotated with `HttpExchange` methods.

## Uses of ResponseEntity in org.springframework.http

Methods in org.springframework.http that return ResponseEntity
Modifier and Type
Method
Description
`<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>`
ResponseEntity.`of(Optional<T> body)`
A shortcut for creating a `ResponseEntity` 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.`ofNullable(T body)`
A shortcut for creating a `ResponseEntity` with the given body and the OK status, or an empty body and a NOT FOUND status in case of a `null` parameter.
`static <T> ResponseEntity<T>`
ResponseEntity.`ok(T body)`
A shortcut for creating a `ResponseEntity` with the given body and the status set to OK.

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

Methods in org.springframework.web.client that return ResponseEntity
Modifier and Type
Method
Description
`<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 return the response as `ResponseEntity`.
`<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 return the response as `ResponseEntity`.
`<T> ResponseEntity<T>`
RestOperations.`exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, org.springframework.core.ParameterizedTypeReference<T> responseType, Object... uriVariables)`
Execute the HTTP method to the given URI template, writing the given request entity to the request, and return the response as `ResponseEntity`.
`<T> ResponseEntity<T>`
RestOperations.`exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, org.springframework.core.ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables)`
Execute the HTTP method to the given URI template, writing the given request entity to the request, and return the response as `ResponseEntity`.
`<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 return the response as `ResponseEntity`.
`<T> ResponseEntity<T>`
RestOperations.`exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, org.springframework.core.ParameterizedTypeReference<T> responseType)`
Execute the HTTP method to the given URI template, writing the given request entity to the request, and return the response as `ResponseEntity`.
`<T> ResponseEntity<T>`
RestOperations.`exchange(RequestEntity<?> requestEntity, Class<T> responseType)`
Execute the request specified in the given `RequestEntity` and return the response as `ResponseEntity`.
`<T> ResponseEntity<T>`
RestOperations.`exchange(RequestEntity<?> requestEntity, org.springframework.core.ParameterizedTypeReference<T> responseType)`
Execute the request specified in the given `RequestEntity` and return the response as `ResponseEntity`.
`<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, org.springframework.core.ParameterizedTypeReference<T> responseType, Object... uriVariables)`
`<T> ResponseEntity<T>`
RestTemplate.`exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, org.springframework.core.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, org.springframework.core.ParameterizedTypeReference<T> responseType)`
`<T> ResponseEntity<T>`
RestTemplate.`exchange(RequestEntity<?> entity, Class<T> responseType)`
`<T> ResponseEntity<T>`
RestTemplate.`exchange(RequestEntity<?> entity, org.springframework.core.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 return the response as `ResponseEntity`.
`<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 return the response as `HttpEntity`.
`<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 return the response as `ResponseEntity`.
`<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)`
`ResponseEntity<Void>`
RestClient.ResponseSpec.`toBodilessEntity()`
Return a `ResponseEntity` without a body.
`<T> ResponseEntity<T>`
RestClient.ResponseSpec.`toEntity(Class<T> bodyType)`
Return a `ResponseEntity` with the body decoded to an Object of the given type.
`<T> ResponseEntity<T>`
RestClient.ResponseSpec.`toEntity(org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Return a `ResponseEntity` with the body decoded to an Object of the given type.
Methods in org.springframework.web.client that return types with arguments of type ResponseEntity
Modifier and Type
Method
Description
`<T> ResponseExtractor<ResponseEntity<T>>`
RestTemplate.`responseEntityExtractor(Type responseType)`
Return a `ResponseExtractor` that prepares a `ResponseEntity`.

## Uses of ResponseEntity in org.springframework.web.client.support

Methods in org.springframework.web.client.support that return ResponseEntity
Modifier and Type
Method
Description
`ResponseEntity<Void>`
RestClientAdapter.`exchangeForBodilessEntity(HttpRequestValues values)`
`ResponseEntity<Void>`
RestTemplateAdapter.`exchangeForBodilessEntity(HttpRequestValues values)`
`<T> ResponseEntity<T>`
RestClientAdapter.`exchangeForEntity(HttpRequestValues values, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
`<T> ResponseEntity<T>`
RestTemplateAdapter.`exchangeForEntity(HttpRequestValues values, org.springframework.core.ParameterizedTypeReference<T> bodyType)`

## Uses of ResponseEntity in org.springframework.web.service.invoker

Methods in org.springframework.web.service.invoker that return ResponseEntity
Modifier and Type
Method
Description
`ResponseEntity<Void>`
AbstractReactorHttpExchangeAdapter.`exchangeForBodilessEntity(HttpRequestValues requestValues)`
`ResponseEntity<Void>`
HttpExchangeAdapter.`exchangeForBodilessEntity(HttpRequestValues requestValues)`
Variant of `HttpExchangeAdapter.exchange(HttpRequestValues)` with additional access to the response status and headers.
`<T> ResponseEntity<T>`
AbstractReactorHttpExchangeAdapter.`exchangeForEntity(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
`<T> ResponseEntity<T>`
HttpExchangeAdapter.`exchangeForEntity(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Variant of `HttpExchangeAdapter.exchangeForBody(HttpRequestValues, ParameterizedTypeReference)` with additional access to the response status and headers.
Methods in org.springframework.web.service.invoker that return types with arguments of type ResponseEntity
Modifier and Type
Method
Description
`reactor.core.publisher.Mono<ResponseEntity<Void>>`
ReactorHttpExchangeAdapter.`exchangeForBodilessEntityMono(HttpRequestValues requestValues)`
Variant of `ReactorHttpExchangeAdapter.exchangeForMono(HttpRequestValues)` with additional access to the response status and headers.
`<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>`
ReactorHttpExchangeAdapter.`exchangeForEntityFlux(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Variant of `ReactorHttpExchangeAdapter.exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference)` with additional access to the response status and headers.
`<T> reactor.core.publisher.Mono<ResponseEntity<T>>`
ReactorHttpExchangeAdapter.`exchangeForEntityMono(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Variant of `ReactorHttpExchangeAdapter.exchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference)` with additional access to the response status and headers.
`reactor.core.publisher.Mono<ResponseEntity<Void>>`
AbstractReactorHttpExchangeAdapter.`requestToBodilessEntity(HttpRequestValues requestValues)`
`reactor.core.publisher.Mono<ResponseEntity<Void>>`
HttpClientAdapter.`requestToBodilessEntity(HttpRequestValues requestValues)`
Deprecated, for removal: This API element is subject to removal in a future version.
Variant of `HttpClientAdapter.requestToVoid(HttpRequestValues)` with additional access to the response status and headers.
`<T> reactor.core.publisher.Mono<ResponseEntity<T>>`
AbstractReactorHttpExchangeAdapter.`requestToEntity(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
`<T> reactor.core.publisher.Mono<ResponseEntity<T>>`
HttpClientAdapter.`requestToEntity(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Deprecated, for removal: This API element is subject to removal in a future version.
Variant of `HttpClientAdapter.requestToBody(HttpRequestValues, ParameterizedTypeReference)` with additional access to the response status and headers.
`<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>`
AbstractReactorHttpExchangeAdapter.`requestToEntityFlux(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
`<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>`
HttpClientAdapter.`requestToEntityFlux(HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType)`
Deprecated, for removal: This API element is subject to removal in a future version.
Variant of `HttpClientAdapter.requestToBodyFlux(HttpRequestValues, ParameterizedTypeReference)` with additional access to the response status and headers.