@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 |
encoded
Specifies whether the names and values are already URL encoded.
|
Copyright © 2015 Square, Inc.. All Rights Reserved.