|
@@ -131,10 +131,10 @@ public class HttpUtils {
|
|
|
httppost.setHeader("User-Agent", USER_AGENT);
|
|
|
|
|
|
List<Cookie> list = cookieStore.getCookies();
|
|
|
-// for (Cookie ck : list) {
|
|
|
-// System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
|
|
|
-// }
|
|
|
-// System.out.println("-------------------------------------");
|
|
|
+ for (Cookie ck : list) {
|
|
|
+ System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
|
|
|
+ }
|
|
|
+ System.out.println("-------------------------------------");
|
|
|
for (String key : headers.keySet()) {
|
|
|
httppost.setHeader(key, headers.get(key));
|
|
|
}
|
|
@@ -149,7 +149,7 @@ public class HttpUtils {
|
|
|
// 第一步:通过setEntity 将我们的entity对象传递过去
|
|
|
httppost.setEntity(formEntity);
|
|
|
|
|
|
- httppost.setHeader("Content-Type", "application/json");
|
|
|
+// httppost.setHeader("Content-Type", "application/json");
|
|
|
httppost.setEntity(new StringEntity(new Gson().toJson(param), Charset.forName("UTF-8")));
|
|
|
HttpEntity respentity;
|
|
|
|