retrofit / retrofit2.http / FieldMap

FieldMap

@Target([AnnotationTarget.VALUE_PARAMETER]) class FieldMap

Named key/value pairs for a form-encoded request.

Simple Example:


  @FormUrlEncoded
  @POST("/things")
  Call<ResponseBody> 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.

A null value for the map, as a key, or as a value is not allowed.

See Also
FormUrlEncodedField

Constructors

<init>

FieldMap(encoded: Boolean)

Named key/value pairs for a form-encoded request.

Properties

encoded

val encoded: Boolean

Specifies whether the names and values are already URL encoded.