network-requester

Android http网络请求

License

License

Categories

Categories

Net
GroupId

GroupId

com.github.wandersnail
ArtifactId

ArtifactId

network-requester
Last Version

Last Version

1.3.2
Release Date

Release Date

Type

Type

aar
Description

Description

network-requester
Android http网络请求
Project URL

Project URL

https://github.com/wandersnail
Source Code Management

Source Code Management

https://github.com/wandersnail/network-requester

Download network-requester

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.wandersnail/network-requester/ -->
<dependency>
    <groupId>com.github.wandersnail</groupId>
    <artifactId>network-requester</artifactId>
    <version>1.3.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.wandersnail/network-requester/
implementation 'com.github.wandersnail:network-requester:1.3.2'
// https://jarcasting.com/artifacts/com.github.wandersnail/network-requester/
implementation ("com.github.wandersnail:network-requester:1.3.2")
'com.github.wandersnail:network-requester:aar:1.3.2'
<dependency org="com.github.wandersnail" name="network-requester" rev="1.3.2">
  <artifact name="network-requester" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.wandersnail', module='network-requester', version='1.3.2')
)
libraryDependencies += "com.github.wandersnail" % "network-requester" % "1.3.2"
[com.github.wandersnail/network-requester "1.3.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

代码托管

Maven Central Download

使用

  1. 因为使用了jdk8的一些特性,需要在module的build.gradle里添加如下配置:
//纯java的项目
android {
	compileOptions {
		sourceCompatibility JavaVersion.VERSION_1_8
		targetCompatibility JavaVersion.VERSION_1_8
	}
}

//有kotlin的项目还需要在project的build.gradle里添加
allprojects {
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8

        kotlinOptions {
            jvmTarget = '1.8'
            apiVersion = '1.3'
            languageVersion = '1.3'
        }
    }
}
  1. module的build.gradle中的添加依赖,自行修改为最新版本,同步后通常就可以用了:
dependencies {
	...
	implementation 'cn.wandersnail:easyhttp:latestVersion'
	implementation 'com.squareup.retrofit2:retrofit:latestVersion'
	implementation 'com.squareup.retrofit2:adapter-rxjava2:latestVersion'
	implementation 'io.reactivex.rxjava2:rxandroid:latestVersion'
	implementation 'com.alibaba:fastjson:latestVersion'
}
  1. 如果从jcenter下载失败。在project的build.gradle里的repositories添加内容,最好两个都加上,添加完再次同步即可。
allprojects {
	repositories {
		...
		mavenCentral()
		maven { url 'https://dl.bintray.com/wandersnail/androidx/' }
	}
}

功能

  • 普通get和post请求
  • 带进度下载
  • 带进度上传

Versions

Version
1.3.2
1.3.1
1.3.0
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0