-
Notifications
You must be signed in to change notification settings - Fork 252
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
Stringify models in formdata #111
Comments
Currently, only limited type can be supported. e.g. each property as parameter and single file |
Will support your scenario in next release |
@trevorwang ok, but what workaround can I use for this scenario now? |
This action that submit file with content is not recommended. |
@trevorwang thank you for the new release.
So, I tried to use git version:
It returns:
|
It's You can check the sample.dart to see more details. |
@trevorwang
|
Did you try with |
@trevorwang no, I haven't tried
with this Spring endpoint. |
Currently, when you put a
instead of
There're some BREAKING changes both on I will provide a solution lately. |
please upgrade your generator to 1.2.1+1
… On Feb 11, 2020, at 11:09 AM, don-prog ***@***.***> wrote:
@trevorwang <https://github.com/trevorwang> no, I haven't tried dio. But I have already successfully used this code in Retrofit in Java:
@multipart
@post("/test")
Call<Void> ***@***.***("MyModel") MyModel myModel);
with this Spring endpoint.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#111?email_source=notifications&email_token=AAA5Y3SHUNHAIARIOJC7GLDRCIJIBA5CNFSM4KRVAUM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELLCYGI#issuecomment-584461337>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAA5Y3XDXKP5LURQU45DW7TRCIJIBANCNFSM4KRVAUMQ>.
|
@trevorwang I upgraded my
|
MyModel.toString() |
@trevorwang unfortunately, I don't fully understand you. Do you want me to use the non-overridden |
Have a try The feature will be supported in the future release. I am thinking how to figure out it better. |
* feat: json stringify models in formdata close #111 * chore: bump version to 1.2.2+2
@trevorwang unfortunately, I still have 415 error - please check this, I left here information about requests. |
I want to send my model and files using
@MultiPart()
. My Spring server has the next endpoint:My working Retrofit code in Java:
But I can't do the same with the Retrofit.dart:
Generated file:
Even if I don't send files, like this:
The problem is that I get this exception:
So, how can I send my model and my files to the specified endpoint?
The text was updated successfully, but these errors were encountered: