Package io.micronaut.http.client.bind
Class ClientRequestUriContext
java.lang.Object
io.micronaut.http.client.bind.ClientRequestUriContext
A class that exposes information about the URI to
ClientArgumentRequestBinder instances.
The binders can mutate the path and query parameters to allow control over the resulting URI.- Since:
- 2.1.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorsConstructorDescriptionClientRequestUriContext(UriMatchTemplate uriTemplate, Map<String, Object> pathParameters, Map<String, List<String>> queryParameters) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQueryParameter(String name, String value) Add a new query parameter given its name.voidsetPathParameter(String name, Object value) Set the value of a path parameter.voidsetQueryParameter(String name, List<String> values) Set all the values of query parameters.
-
Constructor Details
-
ClientRequestUriContext
-
-
Method Details
-
getUriTemplate
- Returns:
- The URI template for the client method
-
getPathParameters
- Returns:
- The parameters used to expand the URI template.
- See Also:
-
getQueryParameters
- Returns:
- The parameters to be appended to the URI template as query parameters
-
addQueryParameter
Add a new query parameter given its name. If parameter with name already exists, the parameter will be duplicated in query.- Parameters:
name- - the name of the parametervalue- - that value to add
-
setQueryParameter
Set all the values of query parameters.- Parameters:
name- - the name of the parametervalues- - all the values of the parameter
-
setPathParameter
Set the value of a path parameter.- Parameters:
name- - the name of the parametervalue- - the value of the parameter
-