| | |
| | | |
| | | String requestUrl = HDLCloudUserApi.getRequestUrl(api); |
| | | Gson gson = new Gson(); |
| | | System.out.println("发送->" + requestUrl + "\r\n" + body); |
| | | System.out.println("http->发送->" + requestUrl + "\r\n" + body); |
| | | return HxHttp.builder() |
| | | .url(requestUrl) |
| | | .raw(body) |
| | |
| | | public void onResponse(String str) { |
| | | if (callBack != null) { |
| | | callBack.onSuccess(str); |
| | | // System.out.println("回复->" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | System.out.println("回复->" + requestUrl + "\r\n" + str); |
| | | // System.out.println("http->回复->" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | System.out.println("http->回复->" + requestUrl + "\r\n" + str); |
| | | } |
| | | } |
| | | |
| | |
| | | HDLExceptionSubmitUtils.submit(requestUrl, body, e); |
| | | if (callBack != null) { |
| | | callBack.onFailure(e); |
| | | System.out.println("回复->" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}"); |
| | | System.out.println("http->回复->" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}"); |
| | | } |
| | | } |
| | | }); |