Search in sources :

Example 1 with FileConvert

use of com.lzy.okgo.convert.FileConvert in project okhttp-OkGo by jeasonlzy.

the class TestActivity method btn1.

@OnClick(R.id.btn1)
public void btn1(View view) {
    Call<String> stringCall = OkGo.get("").getCall(StringConvert.create());
    Call<Bitmap> bitmapCall = OkGo.get("").getCall(BitmapConvert.create());
    Call<File> fileCall = OkGo.get("").getCall(new FileConvert());
    Call<LzyResponse<ServerModel>> call = OkGo.get("").getCall(new JsonConvert<LzyResponse<ServerModel>>() {
    });
    Call<LzyResponse<ServerModel>> listCall = OkGo.get("").getCall(new JsonConvert<LzyResponse<ServerModel>>() {
    });
    Observable<String> stringObservable = OkGo.get("").getCall(StringConvert.create(), RxAdapter.<String>create());
    Observable<LzyResponse<ServerModel>> observable = OkGo.get("").getCall(new JsonConvert<LzyResponse<ServerModel>>() {
    }, RxAdapter.<LzyResponse<ServerModel>>create());
}
Also used : LzyResponse(com.lzy.demo.model.LzyResponse) Bitmap(android.graphics.Bitmap) ServerModel(com.lzy.demo.model.ServerModel) FileConvert(com.lzy.okgo.convert.FileConvert) File(java.io.File) OnClick(butterknife.OnClick)

Aggregations

Bitmap (android.graphics.Bitmap)1 OnClick (butterknife.OnClick)1 LzyResponse (com.lzy.demo.model.LzyResponse)1 ServerModel (com.lzy.demo.model.ServerModel)1 FileConvert (com.lzy.okgo.convert.FileConvert)1 File (java.io.File)1