akka/akka-http

Allow matching multiple query parameters in Java API

Open

#605 opened on Dec 1, 2016

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Scala (1,311 stars) (598 forks)batch import
1 - triageddiscusshelp wantedt:java

Description

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