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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forHttpRequestValues.static interfaceExpose static metadata from@HttpExchangeannotation attributes.static interfaceA contract that allows further customization ofHttpRequestValuesin addition to those added by argument resolvers. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable UriBuilderFactory uriBuilderFactory, @Nullable String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, @Nullable Object version, Map<String, Object> attributes, @Nullable Object bodyValue, @Nullable ParameterizedTypeReference<?> bodyValueType) ConstructHttpRequestValues. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRequestValues.Builderbuilder()Return a builder forHttpRequestValues.Return the attributes associated with the request, or an empty map.Return the request body as a value to be serialized, if set.Return the type for the body value.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
protected HttpRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable UriBuilderFactory uriBuilderFactory, @Nullable String uriTemplate, Map<String, String> uriVariables, HttpHeaders headers, MultiValueMap<String, String> cookies, @Nullable Object version, Map<String, Object> attributes, @Nullable Object bodyValue, @Nullable ParameterizedTypeReference<?> bodyValueType) ConstructHttpRequestValues.- Since:
- 7.0
-
-
Method Details
-
getHttpMethod
Return the HTTP method to use for the request. -
getUri
Return the URL to use.Typically, this comes from a
URImethod argument, which provides the caller with the option to override theuriTemplatefrom class and methodHttpExchangeannotations. -
getUriBuilderFactory
Return theUriBuilderFactoryto expand theuriTemplateandgetUriVariables()with.The
UriBuilderFactoryis passed into the HTTP Service client method in order to override the UriBuilderFactory (and its baseUrl) used by the underlying client.- Since:
- 6.1
-
getUriTemplate
-
getUriVariables
-
getHeaders
Return the headers for the request, if any. -
getCookies
Return the cookies for the request, or an empty map. -
getApiVersion
-
getAttributes
-
getBodyValue
-
getBodyValueType
Return the type for the body value.- Since:
- 6.2.7
-
builder
Return a builder forHttpRequestValues.
-