retrofit / retrofit2.http / PartMap

PartMap

@Target([AnnotationTarget.VALUE_PARAMETER]) class PartMap

Denotes name and value parts of a multi-part request.

Values of the map on which this annotation exists will be processed in one of two ways:


  @Multipart
  @POST("/upload")
  Call<ResponseBody> upload(
      @Part("file") RequestBody file,
      @PartMap Map<String, RequestBody> params);
  

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

See Also
MultipartPart

Constructors

<init>

PartMap(encoding: String)

Denotes name and value parts of a multi-part request.

Properties

encoding

val encoding: String

The Content-Transfer-Encoding of the parts.