Home

Awesome

<p align="center"><img src="https://raw.githubusercontent.com/liangjingkanji/Net/master/docs/img/logo.gif" width="300"/> <p align="center"><strong>基于协程完善的Android网络请求库</strong></p> <p align="center"><a href="http://liangjingkanji.github.io/Net/">使用文档</a> | <a href="https://github.com/liangjingkanji/document/blob/master/visit-pages.md">无法访问?</a> | <a href="https://liangjingkanji.github.io/document/">贡献代码</a> | <a href="https://github.com/liangjingkanji/Net/releases/latest/download/net-sample.apk">下载体验</a> </p> <p align="center"><img src="https://raw.githubusercontent.com/liangjingkanji/Net/master/docs/img/code-preview.png" width="400"/></p> <p align="center"> <a href="https://jitpack.io/#liangjingkanji/Net"><img src="https://jitpack.io/v/liangjingkanji/Net.svg"/></a> <img src="https://img.shields.io/badge/language-kotlin-orange.svg"/> <img src="https://img.shields.io/badge/license-MIT-blue"/> <a href="https://liangjingkanji.github.io/Net/api/"><img src="https://img.shields.io/badge/api-%E5%87%BD%E6%95%B0%E6%96%87%E6%A1%A3-red"/></a> <a href="https://raw.githubusercontent.com/liangjingkanji/liangjingkanji/master/img/group-qrcode.png"><img src="https://raw.githubusercontent.com/liangjingkanji/liangjingkanji/master/img/group.svg"/></a> <a href="http://liangjingkanji.github.io/Net/updates"><img src="https://img.shields.io/badge/updates-%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97-brightgreen"/></a> <a href="https://github.com/liangjingkanji/Net/blob/master/docs/issues.md"><img src="https://raw.githubusercontent.com/liangjingkanji/Net/master/docs/img/issues.svg"/></a> </p> <p align="center"><img src="https://raw.githubusercontent.com/liangjingkanji/Net/master/docs/img/preview.png" align="center" width="30%;" /></p> <br>

Net是基于OkHttp/协程的非侵入式框架(可使用所有Api), 可升级OkHttp版本保持网络安全

<br>

Welcome to international translation of this project's documents/notes, thank you for your support!

Net 1.x 版本使用RxJava实现 <br> Net 2.x 版本使用协程实现 <br> Net-okhttp3 Net3.x的Android低版本兼容库 <br> Net 3.x 版本使用协程实现, 可自定义OkHttp版本

<br> <p align="center"><strong>欢迎贡献代码/问题</strong></p>

特点

主要功能

<br>

安装

Project 的 settings.gradle 添加仓库

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

Module 的 build.gradle 添加依赖框架

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0" // 协程(版本自定)
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
implementation 'com.squareup.okhttp3:okhttp:4.11.0' // 要求OkHttp4以上
implementation 'com.github.liangjingkanji:Net:3.6.4'

如果在 Android 5 (API level 21)以下开发, 请使用 Net-okhttp3

如果使用 appcompat-v1.6 以下开发, 请使用3.6.4版本, 因为官方已删除旧api

implementation 'com.github.liangjingkanji:Net:3.6.4'
<br>

Contribute

<img src="https://s2.loli.net/2022/04/24/qrYuJ5lg67kb31n.jpg" width="100"/>

supported by JetBrains

License

MIT License

Copyright (c) 2023 劉強東

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.