第12月第8天 Retrofit.builder
1.
retrofit = new Retrofit.Builder() .client(okHttpClient) .addConverterFactory(GsonConverterFactory.create(gson)) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .baseUrl("http://gank.io/api/") .build(); service = retrofit.create(ApiService.class);
new HttpBuilder("url") .params(map) .params("key","value") .tag(this)//需要取消请求的tag .success(str->{ //do something surccess }) .error(v->{ //deal something error }) .get();
http://blog.csdn.net/gengqiquan/article/details/52329259
https://github.com/gengqiquan/HttpUtil