akka/akka-http

Allow matching multiple query parameters in Java API

Aperta

#605 aperta il 1 dic 2016

 (4 commenti) (0 reazioni) (0 assegnatari)Scala (598 fork)batch import
1 - triageddiscusshelp wantedt:java

Metriche repository

Star
 (1311 stelle)
Metriche merge PR
 (Merge medio 1g 10h) (2 PR mergiate in 30 g)

Descrizione

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.

Guida contributor