GithubHelp home page GithubHelp logo

ResponseType设置为Json不生效 about dio HOT 4 CLOSED

cfug avatar cfug commented on May 11, 2024
ResponseType设置为Json不生效

from dio.

Comments (4)

wendux avatar wendux commented on May 11, 2024

image
你先检查一下content-type是否正确

from dio.

wendux avatar wendux commented on May 11, 2024

长时间没回复,先关了,若有问题再打开

from dio.

imagehang avatar imagehang commented on May 11, 2024

响应头中的content-type不为json,为text/html;charset=utf-8,,dio设置ResponseType能转为json吗

from dio.

wendux avatar wendux commented on May 11, 2024

默认不能,除非你自定义一个transformer, 自定义transformer比较简单,示例可以在项目示例目录中找到。或者在响应拦截器中手动转一下。

:octocat: From gitme Android

from dio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.