a safety client by Https for Android, (Android线程安全http请求库)
Download the laster JAR:( com.tamic.novate:novate:-1.0.0.aar)
compile(name: 'com.tamic.novate-1.0.0', ext: 'aar')
or Gradle: - root:
repositories {
maven { url "https://jitpack.io" }
jcenter()
}
dependencies {
.....
compile 'com.tamic.novate:novate:1.0.0'
}
Snapshots of the development version are available in Sonatype's snapshots repository.
Retrofit requires at minimum Java 7 or Android 2.3.
基于Retrofit和RxJava封装的链式请求库,为何起名 Novate?
Novate的英文原意是用新事物代替 我的目的是用新的东西来代替Retrofit的有些不易操作的地方,因此起名新奇的东西,所以结合了原来的Http用法习惯,又加入了Retrofit的特性,因此起名 :Novate
请求网络无需关心是否在主线程和非UI线程,操作UI直接可在回调处理, 保留了HttpClient的编码习惯,又加入了Builder模式编程!
Novate novate = new Novate.Builder(this)
.baseUrl(baseUrl)
.build();
novate.executeGet("pathUrl", parameters, new Novate.ResponseCallBack<NovateResponse<MyModel>>() {
.....
});
novate.executePost("pathUrl", parameters, new Novate.ResponseCallBack<NovateResponse<MyModel>>() {
.............
});
RequestBody requestFile =
RequestBody.create(MediaType.parse("image/jpg"), new File(you file path));
novate.upload(url, requestFile, new BaseSubscriber<ResponseBody>{
'''''''''''''''
});
novate.download(downUrl, new DownLoadCallBack() {
''''''''''''
});
如果默认的BaseApiService无法满足你的需求时,novate同样支持你自己的ApiService。
MyAPI
public interface MyAPI {
@GET("url")
Observable<MyBean> getdata(@QueryMap Map<String, String> maps);
}
Execute
MyAPI myAPI = novate.create(MyAPI.class);
novate.call(myAPI.getdata(parameters),
new BaseSubscriber<MyBean>{
'''''''
});
}
更多介绍:http://www.jianshu.com/p/d7734390895e
$ claude mcp add Novate \
-- python -m otcore.mcp_server <graph>