@Documented @Target(value=PARAMETER) @Retention(value=RUNTIME) public @interface QueryMap
Both keys and values are converted to strings using String.valueOf(Object).
Simple Example:
@GET("/search")
Call<ResponseBody> list(@QueryMap Map<String, String> filters);
Calling with foo.list(ImmutableMap.of("foo", "bar", "kit", "kat")) yields
/search?foo=bar&kit=kat.
Map keys and values representing parameter values are URL encoded by default. Specify
encoded=true to change this behavior.
@GET("/search")
Call<ResponseBody> list(@QueryMap(encoded=true) Map<String, String> filters);
Calling with foo.list(ImmutableMap.of("foo", "foo+bar")) yields
/search?foo=foo+bar.
A null value for the map, as a key, or as a value is not allowed.
Query| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
encoded
Specifies whether parameter names and values are already URL encoded.
|
Copyright © 2016 Square, Inc.. All rights reserved.