@Documented @Target(value=PARAMETER) @Retention(value=RUNTIME) public @interface FieldMap
Field values may be null which will omit them from the request body.
Simple Example:
@FormUrlEncoded
@POST("/things")
void things(@FieldMap Map<String, String> fields);
}
Calling with
foo.things(ImmutableMap.of("foo", "bar", "kit", "kat") yields a request body of
foo=bar&kit=kat.
FormUrlEncoded,
Field
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
encodeNames
Specifies whether parameter names (keys in the map) are URL encoded.
|
boolean |
encodeValues
Specifies whether parameter values (values in the map) are URL encoded.
|