-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[DART-dio] Can't send body and binary data #9079
Comments
Not sure if we have a sample for this. |
It's a pretty bad use case, almost no body does that... but unfortunately my backend does loool I have been able to change the API so I'm now using multipart instead and it works great. But I think it still should be fixed in generator to avoid headache to users having that because they will take time understanding the problem is wrong generated code |
Yea I agree, have not seen this in the wild either but I guess it is valid. |
* add support for filenames in multipart requests by using `MultipartFile` from dio directly * add support for binary/file body data * fixes OpenAPITools#6671 * fixes OpenAPITools#9079
* [dart][dart-dio] Improve support for file uploads * add support for filenames in multipart requests by using `MultipartFile` from dio directly * add support for binary/file body data * fixes #6671 * fixes #9079 * Add and fix tests * Only use MultipartFile for body/multipart parameters * Fix test * Actually fix tests
…9542) * [dart][dart-dio] Improve support for file uploads * add support for filenames in multipart requests by using `MultipartFile` from dio directly * add support for binary/file body data * fixes OpenAPITools#6671 * fixes OpenAPITools#9079 * Add and fix tests * Only use MultipartFile for body/multipart parameters * Fix test * Actually fix tests
I have the following definition:
This is generated like this:
But this is not working, the correct way of sending the data is like this according to this issue of dio (cfug/dio#1036):
The text was updated successfully, but these errors were encountered: