This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
Replies: 2 comments 1 reply
-
I am not sure, the Transformer encodes the JSON by default if the content type is set, right? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think we have the conclusion at present, we'll make no content type implied by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This should be addressed before the
diox
5.0.0
stable release.Previously in
dio
, thecontent-type
will be implied toapplication/json; charset=utf-8
by default.This makes many applications behave normally without extra configurations, even without tweaking the
BaseOptions
.However, this is not following any standard or specification, leading users that follow the specification confused and maintainers hard to fix related issues.
We should carefully discuss these:
diox
should continue to imply thecontent-type
in the future.BaseOptions.setRequestContentTypeWhenNoPayload
should be removed.cc @cfug/devs
In dio
In diox
diox/dio/lib/src/options.dart
Lines 306 to 319 in 580b08d
diox/dio/lib/src/options.dart
Lines 663 to 665 in 580b08d
diox/dio/lib/src/transformer.dart
Lines 79 to 83 in 2b7aa3b
21 votes ·
Beta Was this translation helpful? Give feedback.
All reactions