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

Use the available content type part annotation field for objects #659

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

dzsonni
Copy link
Contributor

@dzsonni dzsonni commented Feb 23, 2024

Hello,
This is my first contribution to retrofit or any other dart open-source project so sorry for any inconvenience.

In my use case we are sending several different content-types in multipart request. So the use of the content-type header for each part is very important.
The way I got around this so far is using List<MultipartFile> and building out my own objects with content type as that seems to have worked.
I thought others might find this useful so I tweaked the generator a bit.
When content type is present instead of serializing into a simple map entry I create a MultipartFile from string and add the content-type.
This is just a PR to gauge the possibility of this being merged. I know I still have to handle the other types.

I await your input.

@trevorwang trevorwang merged commit 7db7d08 into trevorwang:master Jul 1, 2024
@sbatezat
Copy link

I think this PR broke something.
See #692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants