Skip to content

Add MultipartBody.Builder#addFormDataPart that accepts a MediaType #5627

@marcelstoer

Description

@marcelstoer

Could you please add a MultipartBody.Builder#addFormDataPart overload that accepts a MediaType. Some web frameworks will outright ignore parts without content type. Without it we have to resort to this beast.

.addPart(Headers.of("Content-Disposition", "form-data; name=\"title\""), RequestBody.create("Square Logo", MediaType.get("text/plain")))

Reference: 26949cf#r36218386

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions