private void onResponse() { for (IApiHook hook : obtainHookList()) { hook.onResponse(API_NAME, responseType, response); hook.onResponseData(API_NAME, responseType, response, Response.class); } clearHookList(); onResponse(response.getStatusCode(), response); }
@Override public final void onResponse(int statusCode, Map<String, String> header, String body) { HttpResponse httpResponse = new HttpResponse(responseType, statusCode, method, url, header); httpResponse.setBody(body); for (IApiHook hook : obtainHookList()) { hook.onResponse(API_NAME, responseType, httpResponse); } generateResponseData(httpResponse); for (IApiHook hook : obtainHookList()) { hook.onResponseData(API_NAME, responseType, response, Response.class); } onResponse(statusCode, response); }