Class HttpRequestValues
java.lang.Object
org.springframework.web.service.invoker.HttpRequestValues
- Direct Known Subclasses:
- ReactiveHttpRequestValues
Container for HTTP request values extracted from an
 
@HttpExchange-annotated
 method and argument values passed to it. This is then given to
 HttpExchangeAdapter to adapt to the underlying HTTP client.- Since:
- 6.0
- Author:
- Rossen Stoyanchev, Olga Maciaszek-Sharma
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHttpRequestValues(HttpMethod httpMethod, URI uri, String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, Map<String, Object> attributes, Object bodyValue) Deprecated, for removal: This API element is subject to removal in a future version.protectedHttpRequestValues(HttpMethod httpMethod, URI uri, UriBuilderFactory uriBuilderFactory, String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, Map<String, Object> attributes, Object bodyValue) ConstructHttpRequestValues.
- 
Method SummaryModifier and TypeMethodDescriptionstatic HttpRequestValues.Builderbuilder()Return the attributes associated with the request, or an empty map.Publisher<?>getBody()Deprecated, for removal: This API element is subject to removal in a future version.in favor ofReactiveHttpRequestValues.getBodyPublisher(); to be removed in 6.2Deprecated, for removal: This API element is subject to removal in a future version.in favor ofReactiveHttpRequestValues.getBodyPublisherElementType(); to be removed in 6.2Return the request body as a value to be serialized, if set.Return the cookies for the request, or an empty map.Return the headers for the request, if any.Return the HTTP method to use for the request.getUri()Return the URL to use.Return the URL template for the request.Return the URL template variables, or an empty map.
- 
Constructor Details- 
HttpRequestValues@Deprecated(since="6.1", forRemoval=true) protected HttpRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, Map<String, Object> attributes, @Nullable Object bodyValue) Deprecated, for removal: This API element is subject to removal in a future version.in favour ofHttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)to be removed in 6.2.Constructor without UriBuilderFactory.
- 
HttpRequestValuesprotected HttpRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable UriBuilderFactory uriBuilderFactory, @Nullable String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, Map<String, Object> attributes, @Nullable Object bodyValue) ConstructHttpRequestValues.- Since:
- 6.1
 
 
- 
- 
Method Details- 
getHttpMethodReturn the HTTP method to use for the request.
- 
getUriReturn the URL to use.Typically, this comes from a URImethod argument, which provides the caller with the option to override theuriTemplatefrom class and methodHttpExchangeannotations.
- 
getUriBuilderFactoryReturn theUriBuilderFactoryto expand theuriTemplateandgetUriVariables()with.The UriBuilderFactoryis passed into the HTTP interface method in order to override the UriBuilderFactory (and its baseUrl) used by the underlying client.- Since:
- 6.1
 
- 
getUriTemplateReturn the URL template for the request. This comes from the values in class and methodHttpExchangeannotations.
- 
getUriVariablesReturn the URL template variables, or an empty map.
- 
getHeadersReturn the headers for the request, if any.
- 
getCookiesReturn the cookies for the request, or an empty map.
- 
getAttributesReturn the attributes associated with the request, or an empty map.
- 
getBodyValueReturn the request body as a value to be serialized, if set.
- 
getBodyDeprecated, for removal: This API element is subject to removal in a future version.in favor ofReactiveHttpRequestValues.getBodyPublisher(); to be removed in 6.2Return the request body as a Publisher.This is mutually exclusive with getBodyValue(). Only one of the two or neither is set.
- 
getBodyElementType@Deprecated(since="6.1", forRemoval=true) @Nullable public ParameterizedTypeReference<?> getBodyElementType()Deprecated, for removal: This API element is subject to removal in a future version.in favor ofReactiveHttpRequestValues.getBodyPublisherElementType(); to be removed in 6.2Return the element type for a Publisher body.
- 
builder
 
- 
HttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)to be removed in 6.2.