|
|
|
@ -39,16 +39,16 @@ public class ${className} {
|
|
|
|
|
//设置发送网络请求前的统一操作
|
|
|
|
|
client.setBefore(new ApiClient.Before() {
|
|
|
|
|
public void call(ApiRequest request) {
|
|
|
|
|
System.out.println("before-->request=" + MapperUtil.toJson(request));
|
|
|
|
|
System.out.println("before-->path=" + request.path());
|
|
|
|
|
System.out.println("before-->request = " + MapperUtil.toJson(request));
|
|
|
|
|
System.out.println("before-->path = " + request.path());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//设置网络请求完成后的统一操作
|
|
|
|
|
client.setAfter(new ApiClient.After() {
|
|
|
|
|
public void call(ApiRequest request, ApiResponse response) {
|
|
|
|
|
System.out.println("after-->response=" + MapperUtil.toJson(response));
|
|
|
|
|
System.out.println("after-->response = " + MapperUtil.toJson(response));
|
|
|
|
|
Date end = new Date();
|
|
|
|
|
System.out.println("after-->time=" + simpleDateFormat.format(end));
|
|
|
|
|
System.out.println("after-->time = " + simpleDateFormat.format(end));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|