An open API service indexing awesome lists of open source software.

https://github.com/hotstu/rxfetch

an easy to use http request library based on RxJava & OkHttp 一个简单易用的Http请求库,基于RxJava和OkHttp封装
https://github.com/hotstu/rxfetch

http okhttp3 rxjava

Last synced: about 1 year ago
JSON representation

an easy to use http request library based on RxJava & OkHttp 一个简单易用的Http请求库,基于RxJava和OkHttp封装

Awesome Lists containing this project

README

          

# RxFetch

an easy to use http request library based on RxJava & OkHttp

一个简单易用的Http请求库, 基于RxJava和OkHttp封装

支持类型自动转换,支持Gson 、 Moshi, 可扩展
```
OkHttpClient build = new OkHttpClient.Builder().build();
fetch = new RxFetch(build, new GsonTypeAdapter(), new JsoupTypeAdapter());
```

```
fetch.get("http://example.com/get", params,Bean.class)
.observeOn(Schedulers.io())
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(s -> {
System.out.println(s.msg);
}
}, throwable -> fail());
```

# download:
```
implementation("io.github.hotstu.rxfetch:lib:1.0.0")
```