RequestCall requestCall = OkHttpUtils.post()//根据具体要求.get()
.url(User.mainUrl+NetApi.XXX)
.addParams("","")
.build();
requestCall.execute(new StringCallback() {
@Override
public void onError(Call call, Exception e, int id) {
}
@Override
public void onResponse(String response, int id) {
}
});
implementation 'com.zhy:okhttputils:2.6.2
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.google.code.gson:gson:2.5'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
debugCompile 'com.facebook.stetho:stetho:1.1.1'
.url(User.mainUrl+NetApi.XXX)
.addParams("","")
.build();
requestCall.execute(new StringCallback() {
@Override
public void onError(Call call, Exception e, int id) {
}
@Override
public void onResponse(String response, int id) {
}
});
implementation 'com.zhy:okhttputils:2.6.2
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.google.code.gson:gson:2.5'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
debugCompile 'com.facebook.stetho:stetho:1.1.1'