Class ClientRequestUriContext

java.lang.Object
io.micronaut.http.client.bind.ClientRequestUriContext

public class ClientRequestUriContext extends Object
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 Details

  • Method Details

    • getUriTemplate

      public UriMatchTemplate getUriTemplate()
      Returns:
      The URI template for the client method
    • getPathParameters

      public Map<String,Object> getPathParameters()
      Returns:
      The parameters used to expand the URI template.
      See Also:
    • getQueryParameters

      public Map<String,List<String>> getQueryParameters()
      Returns:
      The parameters to be appended to the URI template as query parameters
    • addQueryParameter

      public void addQueryParameter(String name, String value)
      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 parameter
      value - - that value to add
    • setQueryParameter

      public void setQueryParameter(String name, List<String> values)
      Set all the values of query parameters.
      Parameters:
      name - - the name of the parameter
      values - - all the values of the parameter
    • setPathParameter

      public void setPathParameter(String name, Object value)
      Set the value of a path parameter.
      Parameters:
      name - - the name of the parameter
      value - - the value of the parameter