-
-
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
ResponseType设置为Json不生效 #58
Comments
长时间没回复,先关了,若有问题再打开 |
响应头中的content-type不为json,为text/html;charset=utf-8,,dio设置ResponseType能转为json吗 |
默认不能,除非你自定义一个transformer, 自定义transformer比较简单,示例可以在项目示例目录中找到。或者在响应拦截器中手动转一下。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ResponseType设置为JSON,返回的请求体还是String的,所以在接收请求结果时就报错DioError [DioErrorType.DEFAULT]: type 'String' is not a subtype of type 'Map<String, Object>'等
The text was updated successfully, but these errors were encountered: