Giter VIP home page Giter VIP logo

Comments (9)

liujingxing avatar liujingxing commented on June 5, 2024

什么场景下,asXXX不如from方便?

from rxhttp.

inshyma avatar inshyma commented on June 5, 2024

from(new AppSimpleParser<List<xxx>>() { });
AppSimpleParser 里面有处理errorCode的逻辑

from rxhttp.

liujingxing avatar liujingxing commented on June 5, 2024

可以在自定义的解析器上使用@parser注解,比使用from还更方便。详情查看https://juejin.im/post/5cc095b7f265da0379417be0

from rxhttp.

inshyma avatar inshyma commented on June 5, 2024

我发现了asParser 这个应该可以代替from

from rxhttp.

liujingxing avatar liujingxing commented on June 5, 2024

你说不如from方便,我以为你知道asParser呢。不过还是建议你使用注解。

from rxhttp.

inshyma avatar inshyma commented on June 5, 2024

我把网络框架放在另一个model 使用注解DataParser时 编译器没有在RxHttp自动生成相应的方法 所以直接用asParser 吧

from rxhttp.

liujingxing avatar liujingxing commented on June 5, 2024

A Module依赖注解处理器,那么只能在A Module中使用注解。注解处理器只会在本Module 中检索注解。

from rxhttp.

inshyma avatar inshyma commented on June 5, 2024

onError异常统一处理在哪个文章写着 麻烦分享下 我没找到

from rxhttp.

liujingxing avatar liujingxing commented on June 5, 2024

你看下Demo里面的OnError、ErrorInfo类

from rxhttp.

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.