Java Code Examples for com.lzy.okgo.model.Response#getRawCall()

The following examples show how to use com.lzy.okgo.model.Response#getRawCall() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CacheActivity.java    From okhttp-OkGo with Apache License 2.0 4 votes vote down vote up
@Override
public void onSuccess(Response<LzyResponse<ServerModel>> response) {
    handleResponse(response);
    Call call = response.getRawCall();
    requestState.setText("请求成功  是否来自缓存:false  请求方式:" + call.request().method() + "\n" + "url:" + call.request().url());
}
 
Example 2
Source File: CacheActivity.java    From okhttp-OkGo with Apache License 2.0 4 votes vote down vote up
@Override
public void onCacheSuccess(Response<LzyResponse<ServerModel>> response) {
    handleResponse(response);
    Call call = response.getRawCall();
    requestState.setText("请求成功  是否来自缓存:true  请求方式:" + call.request().method() + "\n" + "url:" + call.request().url());
}
 
Example 3
Source File: CacheActivity.java    From okhttp-OkGo with Apache License 2.0 4 votes vote down vote up
@Override
public void onError(Response<LzyResponse<ServerModel>> response) {
    handleError(response);
    Call call = response.getRawCall();
    requestState.setText("请求失败  是否来自缓存:false  请求方式:" + call.request().method() + "\n" + "url:" + call.request().url());
}