Class Query

java.lang.Object
akka.http.javadsl.model.Query
Direct Known Subclasses:
JavaQuery

public abstract class Query extends Object
  • Field Details

    • EMPTY

      public static final Query EMPTY
      Returns an empty Query.
  • Constructor Details

    • Query

      public Query()
  • Method Details

    • get

      public abstract Optional<String> get(String key)
      Returns the value of the first parameter with the given key if it exists.
    • getOrElse

      public abstract String getOrElse(String key, String _default)
      Returns the value of the first parameter with the given key or the provided default value.
    • getAll

      public abstract List<String> getAll(String key)
      Returns the value of all parameters with the given key.
    • toList

      public abstract List<akka.japi.Pair<String,String>> toList()
      Returns a `List` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.
    • toMap

      public abstract Map<String,String> toMap()
      Returns a key/value map of the parameters of this Query. Use the `toList()` method to return all parameters if keys may occur multiple times.
    • toMultiMap

      public abstract Map<String,List<String>> toMultiMap()
      Returns a `Map` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.
    • withParam

      public abstract Query withParam(String key, String value)
      Returns a copy of this instance with a query parameter added.
    • render

      public abstract String render(HttpCharset charset)
      Renders this Query into its string representation using the given charset.
    • render

      public abstract String render(HttpCharset charset, akka.parboiled2.CharPredicate keep)
      Renders this Query into its string representation using the given charset and char predicate.
    • create

      public static Query create(String rawQuery)
      Returns a Query created by parsing the given undecoded string representation.
    • create

      public static Query create(String rawQuery, Uri.ParsingMode parsingMode)
      Returns a Query created by parsing the given undecoded string representation with the provided parsing mode.
    • create

      public static Query create(String rawQuery, Charset charset, Uri.ParsingMode parsingMode)
      Returns a Query created by parsing the given undecoded string representation with the provided charset and parsing mode.
    • create

      @SafeVarargs public static Query create(akka.japi.Pair<String,String>... params)
      Returns a Query from the given parameters.
    • create

      public static Query create(Iterable<akka.japi.Pair<String,String>> params)
      Returns a Query from the given parameters.
    • create

      public static Query create(Map<String,String> params)
      Returns a Query from the given parameters.