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.reactive.function.client |
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive reactive HTTP adapter layer. |
org.springframework.web.reactive.function.client.support |
Classes supporting the
org.springframework.web.reactive.function.client package. |
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.socket.sockjs.client |
SockJS client implementation of
WebSocketClient . |
Modifier and Type | Method and 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.ok(T body)
A shortcut for creating a
ResponseEntity with the given body
and the status set to OK. |
Modifier and Type | Method and Description |
---|---|
<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> |
RestTemplate.exchange(RequestEntity<?> entity,
Class<T> responseType) |
<T> ResponseEntity<T> |
RestOperations.exchange(RequestEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType)
Execute the request specified in the given
RequestEntity and return
the response as ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(RequestEntity<?> entity,
ParameterizedTypeReference<T> responseType) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Map<String,?> uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Object... uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Map<String,?> uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Object... uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType) |
<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> |
RestTemplate.getForEntity(String url,
Class<T> responseType,
Map<String,?> uriVariables) |
<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> |
RestTemplate.getForEntity(String url,
Class<T> responseType,
Object... uriVariables) |
<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(URI url,
Class<T> responseType) |
<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 as
HttpEntity . |
<T> ResponseEntity<T> |
RestTemplate.postForEntity(String url,
Object request,
Class<T> responseType,
Map<String,?> uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.postForEntity(String url,
Object request,
Class<T> responseType,
Object... uriVariables) |
<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 as
ResponseEntity . |
<T> ResponseEntity<T> |
RestTemplate.postForEntity(URI url,
Object request,
Class<T> responseType) |
Modifier and Type | Method and Description |
---|---|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the
given request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Object... uriVariables)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the
given request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType,
Object... uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Map<String,?> uriVariables)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the given
request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Map<String,?> uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Object... uriVariables)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the given
request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(String url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType,
Object... uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the
given request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
Class<T> responseType)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType)
Deprecated.
Asynchronously execute the HTTP method to the given URI template, writing the given
request entity to the request, and returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.exchange(URI url,
HttpMethod method,
HttpEntity<?> requestEntity,
ParameterizedTypeReference<T> responseType)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.getForEntity(String url,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
Asynchronously retrieve a representation by doing a GET on the URI template.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.getForEntity(String url,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.getForEntity(String url,
Class<T> responseType,
Object... uriVariables)
Deprecated.
Asynchronously retrieve an entity by doing a GET on the specified URL.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.getForEntity(String url,
Class<T> responseType,
Object... uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.getForEntity(URI url,
Class<T> responseType)
Deprecated.
Asynchronously retrieve a representation by doing a GET on the URL.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.getForEntity(URI url,
Class<T> responseType)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.postForEntity(String url,
HttpEntity<?> request,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
Create a new resource by POSTing the given object to the URI template,
and asynchronously returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.postForEntity(String url,
HttpEntity<?> request,
Class<T> responseType,
Map<String,?> uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.postForEntity(String url,
HttpEntity<?> request,
Class<T> responseType,
Object... uriVariables)
Deprecated.
Create a new resource by POSTing the given object to the URI template,
and asynchronously returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.postForEntity(String url,
HttpEntity<?> request,
Class<T> responseType,
Object... uriVariables)
Deprecated.
|
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestOperations.postForEntity(URI url,
HttpEntity<?> request,
Class<T> responseType)
Deprecated.
Create a new resource by POSTing the given object to the URL,
and asynchronously returns the response as
ResponseEntity . |
<T> ListenableFuture<ResponseEntity<T>> |
AsyncRestTemplate.postForEntity(URI url,
HttpEntity<?> request,
Class<T> responseType)
Deprecated.
|
<T> ResponseExtractor<ResponseEntity<T>> |
RestTemplate.responseEntityExtractor(Type responseType)
Return a
ResponseExtractor that prepares a ResponseEntity . |
protected <T> ResponseExtractor<ResponseEntity<T>> |
AsyncRestTemplate.responseEntityExtractor(Type responseType)
Deprecated.
Returns a response extractor for
ResponseEntity . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<ResponseEntity<Void>> |
ClientResponse.toBodilessEntity()
Return this response as a delayed
ResponseEntity containing
status and headers, but no body. |
reactor.core.publisher.Mono<ResponseEntity<Void>> |
WebClient.ResponseSpec.toBodilessEntity()
Return a
ResponseEntity without a body. |
<T> reactor.core.publisher.Mono<ResponseEntity<T>> |
ClientResponse.toEntity(Class<T> bodyClass)
Return this response as a delayed
ResponseEntity . |
<T> reactor.core.publisher.Mono<ResponseEntity<T>> |
WebClient.ResponseSpec.toEntity(Class<T> bodyClass)
Return a
ResponseEntity with the body decoded to an Object of
the given type. |
<T> reactor.core.publisher.Mono<ResponseEntity<T>> |
ClientResponse.toEntity(ParameterizedTypeReference<T> bodyTypeReference)
Return this response as a delayed
ResponseEntity . |
<T> reactor.core.publisher.Mono<ResponseEntity<T>> |
WebClient.ResponseSpec.toEntity(ParameterizedTypeReference<T> bodyTypeReference)
Variant of
WebClient.ResponseSpec.bodyToMono(Class) with a ParameterizedTypeReference . |
<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>> |
WebClient.ResponseSpec.toEntityFlux(BodyExtractor<reactor.core.publisher.Flux<T>,? super ClientHttpResponse> bodyExtractor)
Variant of
WebClient.ResponseSpec.toEntityFlux(Class) with a BodyExtractor . |
<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>> |
WebClient.ResponseSpec.toEntityFlux(Class<T> elementType)
Return a
ResponseEntity with the body decoded to a Flux
of elements of the given type. |
<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>> |
WebClient.ResponseSpec.toEntityFlux(ParameterizedTypeReference<T> elementTypeReference)
Variant of
WebClient.ResponseSpec.toEntityFlux(Class) with a ParameterizedTypeReference . |
<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>> |
ClientResponse.toEntityList(Class<T> elementClass)
Return this response as a delayed list of
ResponseEntity s. |
<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>> |
WebClient.ResponseSpec.toEntityList(Class<T> elementClass)
Return a
ResponseEntity with the body decoded to a List
of elements of the given type. |
<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>> |
ClientResponse.toEntityList(ParameterizedTypeReference<T> elementTypeRef)
Return this response as a delayed list of
ResponseEntity s. |
<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>> |
WebClient.ResponseSpec.toEntityList(ParameterizedTypeReference<T> elementTypeRef)
Variant of
WebClient.ResponseSpec.toEntity(Class) with a ParameterizedTypeReference . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<ResponseEntity<Void>> |
ClientResponseWrapper.toBodilessEntity() |
<T> reactor.core.publisher.Mono<ResponseEntity<T>> |
ClientResponseWrapper.toEntity(Class<T> bodyType) |
<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) |
Modifier and Type | Method and Description |
---|---|
protected 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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ResponseEntity<String> |
AbstractXhrTransport.executeInfoRequestInternal(URI infoUrl,
HttpHeaders headers) |
protected ResponseEntity<String> |
JettyXhrTransport.executeInfoRequestInternal(URI infoUrl,
HttpHeaders headers) |
protected ResponseEntity<String> |
UndertowXhrTransport.executeInfoRequestInternal(URI infoUrl,
HttpHeaders headers) |
protected ResponseEntity<String> |
RestTemplateXhrTransport.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) |
ResponseEntity<String> |
JettyXhrTransport.executeSendRequestInternal(URI url,
HttpHeaders headers,
TextMessage message) |
protected ResponseEntity<String> |
UndertowXhrTransport.executeSendRequestInternal(URI url,
HttpHeaders headers,
TextMessage message) |
ResponseEntity<String> |
RestTemplateXhrTransport.executeSendRequestInternal(URI url,
HttpHeaders headers,
TextMessage message) |