-
Notifications
You must be signed in to change notification settings - Fork 56
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
Handling content types #109
Handling content types #109
Conversation
…n content type is not application json
How about accepting the content type from yaml config so that it is more convenient to make the default type? To avoid writing @Header every time. And it is better to make it a String type, because there may be many combinations, and it will not be possible to sort everything out. |
So you mean like setting a default content-type for all requests of a given type? Like for example setting |
Globally in dio init |
I suppose you mean something like this: Dio dio = Dio();
dio.options.headers['Content-Type'] = 'application/json'; Or equivalently setting it in |
I mean to make a default value for everything, and generate a header annotation for something different from it. |
If there are any problems, then I can supplement your pr at the end of the week. |
Oh okay sorry now I get what you're saying. I will implement this in the next days then. |
@elenaferr0 Can I start my implementation? |
Yes. Sorry I've been really busy, if you want you can start. |
Thanks! |
I implemented the fix about the content type of the request which was discussed in issue #104. Let me know what you think of this solution, if everything is fine I can implement some more tests @Carapacik.