Class HttpRequestValues.Builder
java.lang.Object
org.springframework.web.service.invoker.HttpRequestValues.Builder
- Enclosing class:
- HttpRequestValues
Builder for
HttpRequestValues
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(String name, Object value) Configure an attribute to associate with the request.Add the given cookie name and values.Add the given header name and values.addRequestParameter
(String name, String... values) Add the given request parameter name and values.build()
Builder theHttpRequestValues
instance.Set the media types for the requestAccept
header.<T,
P extends Publisher<T>>
voidsetBody
(P body, ParameterizedTypeReference<T> elementTye) Set the request body as a concrete value to be serialized.void
setBodyValue
(Object bodyValue) Set the request body as a concrete value to be serialized.setContentType
(MediaType contentType) Set the media type for the requestContent-Type
header.setHttpMethod
(HttpMethod httpMethod) Set the HTTP method for the request.Set the request URL as a full URL.setUriTemplate
(String uriTemplate) Set the request URL as a String template.setUriVariable
(String name, String value) Add a URI variable name-value pair.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setHttpMethod
Set the HTTP method for the request. -
setUri
Set the request URL as a full URL.This is mutually exclusive with, and resets any previously set URI template or URI variables.
-
setUriTemplate
Set the request URL as a String template.This is mutually exclusive with, and resets any previously set full URI.
-
setUriVariable
Add a URI variable name-value pair.This is mutually exclusive with, and resets any previously set full URI.
-
setAccept
Set the media types for the requestAccept
header. -
setContentType
Set the media type for the requestContent-Type
header. -
addHeader
Add the given header name and values. -
addCookie
Add the given cookie name and values. -
addRequestParameter
Add the given request parameter name and values.When
"content-type"
is set to"application/x-www-form-urlencoded"
, request parameters are encoded in the request body. Otherwise, they are added as URL query parameters. -
addAttribute
Configure an attribute to associate with the request.- Parameters:
name
- the attribute namevalue
- the attribute value
-
setBodyValue
Set the request body as a concrete value to be serialized.This is mutually exclusive with, and resets any previously set body Publisher.
-
setBody
Set the request body as a concrete value to be serialized.This is mutually exclusive with, and resets any previously set body value.
-
build
Builder theHttpRequestValues
instance.
-