square / retrofit

A type-safe HTTP client for Android and the JVM
https://square.github.io/retrofit/
Apache License 2.0
43.04k stars 7.31k forks source link

Please ^_^ add support for a @QueryMap of map<String, List<String>> #1893

Closed Mitchlol closed 8 years ago

Mitchlol commented 8 years ago

Hi, I am working with an api endpoint that uses dynamic query parameters, and duplicates of these parameters for different variables. I would like to be able to define it as such.

@GET("/path/to/etc") Call search(@QueryMap Map<String, List> filters);

Specifically my use case is a search api were i can apply multiple filters, and each filter can have multiple choices selected. But they must all be passed as individual query parameters. Like www.pizzastore.com/search?pizzaTopping=mushroom&pizzaTopping=onion&pizzaSize=12&pizzaSize=16

Basically these 2 features merged into one :D https://futurestud.io/blog/retrofit-multiple-query-parameters-of-same-name https://futurestud.io/blog/retrofit-2-add-multiple-query-parameter-with-querymap

JakeWharton commented 8 years ago

Dupe of #1324