-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
DioError [DioErrorType.DEFAULT]: Error on line 1, column 11: Invalid media type: expected /[^()<>@,;:"\\/[\]?={} \t\x00-\x1F\x7F #719
Comments
请求方法 part 'BaseCode.g.dart'; @JsonSerializable() int code; @OverRide |
I/flutter (31504): *** Request *** |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
遇到同样的问题 |
After the upgrade of dio 3.0.9, all the old interfaces have problems, all of which are errors, How to solve this problem? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
I am getting the same issue after upgrading from 2.2.2 to 3.0.9. My Content-Type looks like Related dart-lang/http#180 ; dio can maybe use the workaround there. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Response<Uint8List> response = await dio.post(
'your_request_url',
data: jsonEncode(data),
options: Options(
/// return bytes before run `isJsonMimeType` error.
responseType: ResponseType.bytes,
),
);
/// try decode your data.
Map<String, dynamic> resData =
json.decode(utf8.decode(response.data ?? []));
/// or try `dio.transformer` shoule be better. |
DioError [DioErrorType.DEFAULT]: Error on line 1, column 11: Invalid media type: expected /[^()<>@,;:"\/[]?={} \t\x00-\x1F\x7F
这个错误怎么解决下呢?返回的结果是如下样子,解析不出来啊
{
"code": 1,
"msg": "\u53d1\u9001\u6210\u529f"
}
The text was updated successfully, but these errors were encountered: