Commit 05ec3254 authored by Quxl's avatar Quxl

x

parent 7815ba36
...@@ -81,9 +81,9 @@ public class HttpUtil { ...@@ -81,9 +81,9 @@ public class HttpUtil {
} }
public static String post(String requestUrl, Map<String, Object> parameters, Map<String, String> headers) { public static String post(String requestUrl, Map<String, Object> parameters, Map<String, String> headers) {
logger.debug(requestUrl); logger.debug("post: " + requestUrl);
logger.debug(JSON.toJSONString(parameters)); logger.debug("parameters: " + JSON.toJSONString(parameters));
logger.debug(JSON.toJSONString(headers)); logger.debug("headers: " + JSON.toJSONString(headers));
HttpURLConnection connection = null; HttpURLConnection connection = null;
try { try {
String requestBody = toQueryString(parameters); String requestBody = toQueryString(parameters);
...@@ -100,7 +100,7 @@ public class HttpUtil { ...@@ -100,7 +100,7 @@ public class HttpUtil {
} }
connection.connect(); connection.connect();
String result = responseBody(connection); String result = responseBody(connection);
logger.debug(result); logger.debug("result: " + result);
return result; return result;
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
...@@ -111,9 +111,9 @@ public class HttpUtil { ...@@ -111,9 +111,9 @@ public class HttpUtil {
public static String postRaw(String requestUrl, Map<String, Object> parameters, Map<String, String> headers) { public static String postRaw(String requestUrl, Map<String, Object> parameters, Map<String, String> headers) {
logger.debug(requestUrl); logger.debug("post: " + requestUrl);
logger.debug(JSON.toJSONString(parameters)); logger.debug("parameters: " + JSON.toJSONString(parameters));
logger.debug(JSON.toJSONString(headers)); logger.debug("headers: " + JSON.toJSONString(headers));
HttpURLConnection connection = null; HttpURLConnection connection = null;
OutputStream os = null; OutputStream os = null;
try { try {
...@@ -134,7 +134,7 @@ public class HttpUtil { ...@@ -134,7 +134,7 @@ public class HttpUtil {
os.write(rawData.getBytes()); os.write(rawData.getBytes());
os.flush(); os.flush();
String result = responseBody(connection); String result = responseBody(connection);
logger.debug(result); logger.debug("result: " + result);
return result; return result;
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment