Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcelstoer opened this issue Dec 2, 2019 · 1 comment
Open

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

marcelstoer opened this issue Dec 2, 2019 · 1 comment
Labels
Milestone

Comments

@marcelstoer
Copy link

@marcelstoer marcelstoer commented Dec 2, 2019

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

@swankjesse
Copy link
Member

@swankjesse swankjesse commented Dec 2, 2019

I'd like to check to see what browsers do here, and do likewise.

@swankjesse swankjesse added this to the Backlog milestone Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.