|
3 years ago | |
---|---|---|
.github | 4 years ago | |
docs | 3 years ago | |
gradle | 3 years ago | |
net | 3 years ago | |
sample | 3 years ago | |
.gitignore | 5 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
build.gradle | 3 years ago | |
gradle.properties | 3 years ago | |
gradlew | 5 years ago | |
gradlew.bat | 5 years ago | |
mkdocs.yml | 3 years ago | |
settings.gradle | 3 years ago | |
signed | 3 years ago |
不仅仅是网络请求的异步任务库
Android上不是最强网络任务库, 基于OkHttp且完美支持其所有函数组件, 支持协程高并发网络请求
Net 1.x 版本为RxJava实现
Net 2.x 版本为协程实现(开发者无需掌握协程也可以使用)
Net 3.x 版本为OkHttp实现, 不限定OkHttp版本
欢迎贡献代码/问题
主要功能
在项目根目录的 build.gradle 添加仓库
allprojects {
repositories {
// ...
maven { url 'https://jitpack.io' }
}
}
在 module 的 build.gradle 添加依赖
// 协程库(版本可自定)
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
// OkHttp(版本可自定, 要求OkHttp4以上版本)
implementation "com.squareup.okhttp3:okhttp:4.9.1"
// Net
implementation 'com.github.liangjingkanji:Net:3.0.10'
// 支持自动下拉刷新和缺省页的(可选)
implementation 'com.github.liangjingkanji:BRV:1.3.22'
如果你是在 Android 4.4 (API level 19)上开发, 要求使用OkHttp3.x请使用: Net-okhttp3
supported by JetBrains
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.