Giter VIP home page Giter VIP logo

networklibraryktdemo's Introduction

NetworklibraryKtDemo

功能和networklibrary 一样。 使用viewModelScope根据生命周期自动取消,不用修改基类处理rxjava可能导致的内存泄漏。

请求示例

RetrofitManage.request(this, { serviceAPI.getWeather("上海") }, {
            //success挂起函数,业务层面状态码成功data数据,必写
            content.text = it.toString()
        }, {
            //error挂起函数,业务层面状态码失败,可以不写此部分
        }, {
            //catch挂起函数,请求报错,可以不写此部分
        }, {
            //complete挂起函数,请求完成,可以不写此部分
        }, {
            //collect挂起函数,ResultModel<T>数据,可以不写此部分
        })

networklibraryktdemo's People

Contributors

yanxing avatar

Watchers

 avatar

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.