Commit 9e6250b9 authored by Quxl's avatar Quxl

x

parent 2b16a97d
......@@ -80,9 +80,6 @@ public class HttpUtil {
try {
String requestBody = toQueryString(parameters);
requestUrl += (requestUrl.contains("?") ? "&" : "?") + requestBody;
System.out.println(requestUrl);
System.out.println(JSON.toJSONString(parameters));
System.out.println(JSON.toJSONString(headers));
URL getUrl = new URL(requestUrl);
connection = (HttpURLConnection) getUrl.openConnection();
connection.setRequestMethod("POST");
......@@ -107,9 +104,6 @@ public class HttpUtil {
HttpURLConnection connection = null;
OutputStream os = null;
try {
System.out.println(requestUrl);
System.out.println(JSON.toJSONString(parameters));
System.out.println(JSON.toJSONString(headers));
URL getUrl = new URL(requestUrl);
connection = (HttpURLConnection) getUrl.openConnection();
connection.setRequestMethod("POST");
......@@ -120,6 +114,7 @@ public class HttpUtil {
connection.setRequestProperty(key, headers.get(key));
}
}
connection.setDoOutput(true);
connection.connect();
os = connection.getOutputStream();
String rawData = JSON.toJSONString(parameters);
......
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