retrofit / retrofit2.http / FieldMap / <init>

<init>

FieldMap(encoded: Boolean)

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