akka/akka-http

Allow matching multiple query parameters in Java API

Offen

#605 geöffnet am 01.12.2016

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Scala (598 Forks)batch import
1 - triageddiscusshelp wantedt:java

Repository-Metriken

Stars
 (1.311 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 10h) (2 gemergte PRs in 30 T)

Beschreibung

Currently, if there is a call with multiple query parameters, there are two ways to code it:

Nesting parameter directives:

parameter("param1_name",  param1 ->
    parameter("param2_name", param2 -> method(param1, param2))

, which quickly gets of hand in terms of size and readability, or using parameterMap/parameterList and checking for their availability manually. One has an unfeasible amount of ceremony, and the other results in error-prone code. Some more concise API needs to be added.

Contributor Guide