R - Concrete request typepublic static interface RestClientOperations.RequestConfiguration<R extends RestClientOperations.RequestConfiguration<R>>
| Modifier and Type | Method and Description |
|---|---|
R |
accept(MediaType... mediaTypes)
Set the accepted response media types using
MediaType enumeration. |
R |
accept(String... mediaTypes)
Set the accepted response media types.
|
R |
acceptCharset(Charset... charsets)
Set the acceptable charsets.
|
R |
acceptCharset(String... charsets)
Set the acceptable charsets.
|
R |
acceptEncoding(String... encodings)
Set the acceptable encodings.
|
R |
acceptLanguage(Locale... locales)
Set the acceptable languages.
|
R |
acceptLanguage(String... locales)
Set the acceptable languages.
|
R |
authorizationBasic(String username,
String password)
Add an
HttpHeaders.AUTHORIZATION header to request with scheme HttpHeaders.SCHEME_BASIC using
given username and password. |
R |
authorizationBearer(String bearerToken)
Add an
HttpHeaders.AUTHORIZATION header to request with scheme HttpHeaders.SCHEME_BEARER
using given bearer token. |
R |
cacheControl(CacheControl cacheControl)
Set the Cache-Control header.
|
Optional<URI> |
getBaseRequestURI()
Get the request base URI
|
Map<String,String> |
getHeaders()
Get the request headers
|
Optional<PropertySet<?>> |
getPropertySet()
Get the
PropertySet to use to deserialize any PropertyBox contained in the response payload |
Map<String,Object[]> |
getQueryParameters()
Get the URI query parameters
|
Optional<String> |
getRequestPath()
Get the request path to append to the base URI.
|
String |
getRequestURI()
Get the full request URI, composed by
getBaseRequestURI() and getRequestPath(), including
any (not resolved) template parameter. |
Map<String,Object> |
getTemplateParameters()
Get the URI template parameters to resolve
|
R |
header(String name,
String... values)
Add a request header.
|
R |
path(String path)
Append given
path to the request URI. |
<P extends Property> |
propertySet(Iterable<P> properties)
Use given
Property set to perform invocation. |
<P extends Property> |
propertySet(P... properties)
Use given
Property set to perform invocation. |
R |
queryParameter(String name,
Object... values)
Add a query parameter to the request URI.
|
R |
resolve(Map<String,Object> nameAndValues)
Resolve one or more a URI templates in the request URI using supplied name-value pairs.
|
R |
resolve(String name,
Object value)
Resolve a URI template with given
name in the request URI using a supplied value. |
default R |
target(String baseUri)
Set request base URI.
|
R |
target(URI baseUri)
Set request base URI.
|
R target(URI baseUri)
path(String) to add URI paths
to base uri with template parameters support.baseUri - Request base URI (not null)default R target(String baseUri)
path(String) to add URI paths
to base uri with template parameters support.baseUri - Request base URI (not null)R path(String path)
path to the request URI.
May contain URI template parameters, resolved using the values supplied by resolve(String, Object)
methods.
A '/' separator will be inserted between the existing path and the supplied path if necessary.
path - The path to append, may contain URI template parametersR queryParameter(String name, Object... values)
name - Query parameter name (not null)values - Query parameter value(s)IllegalArgumentException - If the supplied query parameter name is nullR resolve(String name, Object value)
name in the request URI using a supplied value.name - Name of the URI template (not null)value - Value to be used to resolve the template (not null)IllegalArgumentException - If the supplied name or value is nullR resolve(Map<String,Object> nameAndValues)
nameAndValues - A map of URI template names and their valuesIllegalArgumentException - If the name-value map or any of the names or values in the map is
nullR accept(String... mediaTypes)
A HttpHeaders.ACCEPT header will be added to request with given values.
mediaTypes - Accepted response media typesR accept(MediaType... mediaTypes)
MediaType enumeration. Any previous value will be
replaced.
A HttpHeaders.ACCEPT header will be added to request with given values.
mediaTypes - Accepted response media types.R acceptLanguage(Locale... locales)
A HttpHeaders.ACCEPT_LANGUAGE header will be added to request with given values.
locales - Acceptable languages LocaleR acceptLanguage(String... locales)
A HttpHeaders.ACCEPT_LANGUAGE header will be added to request with given values.
locales - Acceptable languagesR acceptEncoding(String... encodings)
A HttpHeaders.ACCEPT_ENCODING header will be added to request with given values.
encodings - Acceptable encodingsR acceptCharset(String... charsets)
A HttpHeaders.ACCEPT_CHARSET header will be added to request with given values.
charsets - Acceptable charsetsR acceptCharset(Charset... charsets)
A HttpHeaders.ACCEPT_CHARSET header will be added to request with given values.
charsets - Acceptable charsetsR cacheControl(CacheControl cacheControl)
cacheControl - the cache control directivesR authorizationBearer(String bearerToken)
HttpHeaders.AUTHORIZATION header to request with scheme HttpHeaders.SCHEME_BEARER
using given bearer token.bearerToken - Bearer token to set in authorization header (not null)R authorizationBasic(String username, String password)
HttpHeaders.AUTHORIZATION header to request with scheme HttpHeaders.SCHEME_BASIC using
given username and password.username - Username (not null)password - Password (not null)R header(String name, String... values)
name is already defined, it will be replaced by
the new value.name - Name of the headervalues - Value of the header. If multiple values are supplied, the actual header value will be composed
by the given values in the specified order separated by a ,<P extends Property> R propertySet(Iterable<P> properties)
Property set to perform invocation. Can be used for PropertyBox deserialization
when expected response payload contains serialized PropertyBox data.P - Actual property typeproperties - Property set to use (not null)<P extends Property> R propertySet(P... properties)
Property set to perform invocation. Can be used for PropertyBox deserialization
when expected response payload contains serialized PropertyBox data.P - Actual property typeproperties - Property set to use (not null)Optional<URI> getBaseRequestURI()
Optional<String> getRequestPath()
String getRequestURI()
getBaseRequestURI() and getRequestPath(), including
any (not resolved) template parameter.Map<String,Object> getTemplateParameters()
Map<String,Object[]> getQueryParameters()
Map<String,String> getHeaders()
Optional<PropertySet<?>> getPropertySet()
PropertySet to use to deserialize any PropertyBox contained in the response payloadCopyright © 2019 The Holon Platform. All rights reserved.