基于Kotlin利用Coroutines+Okhttp3+Retrofit的网络框架

网友投稿 868 2022-10-25

基于Kotlin利用Coroutines+Okhttp3+Retrofit的网络框架

基于Kotlin利用Coroutines+Okhttp3+Retrofit的网络框架

lib-network

基于Kotlin利用Coroutines+Okhttp3+Retrofit的网络框架

技术点

CoroutinesOkhttp3Retrofit

集成

last-version:

Add it in your root build.gradle at the end of repositories:

allprojects { repositories { ... maven { url 'https://jitpack.io' } }}

Add the dependency to module build.gradle:

dependencies { implementation 'com.github.cqTeam:lib-network:v[last-version]'}

Add the networkSecurityConfig to module AndroidManifest

Add the Permissions to module AndroidManifest

使用

Init in your Application

class App : Application() { override fun onCreate() { super.onCreate() NetWorkManager.init(this,"http://***.com/") }}

使用详情

END

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:C++核心准则C.50:如果在构造过程中需要“虚行为”,使用工厂函数
下一篇:C++核心准则C.51:使用委托构造函数实现所有构造函数的共通动作
相关文章

 发表评论

暂时没有评论,来抢沙发吧~