Commit f1a209ca authored by 曲欣红's avatar 曲欣红

qq

parent 5c6e86fc
......@@ -53,6 +53,7 @@ public class HttpUtil {
try {
String requestBody = HttpUtil.toQueryString(parameters, charset);
requestUrl = requestUrl + (requestUrl.contains("?") ? (requestUrl.endsWith("&") ? "" : "&") : "?") + requestBody;
System.out.println(requestUrl);
URL getUrl = new URL(requestUrl);
connection = (HttpURLConnection) (proxy == null ? getUrl.openConnection() : getUrl.openConnection(proxy));
connection.setRequestMethod("GET");
......@@ -189,7 +190,7 @@ public class HttpUtil {
params.add(sKey + "=" + (sVal == null ? "" : URLEncoder.encode(String.valueOf(sVal), encode == null ? charset : encode)));
}
} else {
params.add(sKey+"=");
params.add("sKey=");
}
}
}
......
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