Interface UriQueryWriteable

All Superinterfaces:
Parameters, UriQuery

public interface UriQueryWriteable extends UriQuery
Mutable HTTP query.
  • Method Details

    • create

      static UriQueryWriteable create()
      Create a new HTTP Query to write parameter into.
      Returns:
      new mutable HTTP query
    • from

      UriQueryWriteable from(UriQuery uriQuery)
      Update this query by copying all names and their value(s) from the provided query.
      Parameters:
      uriQuery - uri query to read
      Returns:
      updated instance
    • set

      UriQueryWriteable set(String name, String... value)
      Set a query parameter with values.
      Parameters:
      name - name of the parameter
      value - value(s) of the parameter
      Returns:
      this instance
    • add

      UriQueryWriteable add(String name, String value)
      Add a new query parameter or add a value to existing.
      Parameters:
      name - name of the parameter
      value - additional value of the parameter
      Returns:
      this instance
    • setIfAbsent

      UriQueryWriteable setIfAbsent(String name, String... value)
      Set a query parameter with values, if not already defined.
      Parameters:
      name - name of the parameter
      value - value(s) of the parameter
      Returns:
      this instance
    • remove

      UriQueryWriteable remove(String name)
      Remove a query parameter.
      Parameters:
      name - name of the parameter
      Returns:
      this instance
    • remove

      UriQueryWriteable remove(String name, Consumer<List<String>> removedConsumer)
      Remove a query parameter.
      Parameters:
      name - name of the parameter
      removedConsumer - consumer of existing values, only called if there was an existing value
      Returns:
      this instance
    • fromQueryString

      void fromQueryString(String queryString)
      Update from a query string (with encoded values).

      This documentation (and behavior) has been changed, as we cannot create a proper query from decoded values, as these may contain characters used to split the query.

      Parameters:
      queryString - encoded query string to update this instance
    • clear

      void clear()
      Clear all query parameters.