|
|
|
@@ -6,12 +6,14 @@ import okhttp3.Request; |
|
|
|
import okhttp3.RequestBody; |
|
|
|
import org.apache.commons.io.IOUtils; |
|
|
|
import org.apache.http.*; |
|
|
|
import org.apache.http.client.CookieStore; |
|
|
|
import org.apache.http.client.entity.UrlEncodedFormEntity; |
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse; |
|
|
|
import org.apache.http.client.methods.HttpGet; |
|
|
|
import org.apache.http.client.methods.HttpPost; |
|
|
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
|
|
|
import org.apache.http.entity.StringEntity; |
|
|
|
import org.apache.http.impl.client.BasicCookieStore; |
|
|
|
import org.apache.http.impl.client.CloseableHttpClient; |
|
|
|
import org.apache.http.impl.client.HttpClients; |
|
|
|
import org.apache.http.message.BasicNameValuePair; |
|
|
|
@@ -144,6 +146,9 @@ public class HttpUtil { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static String doPostWiwide(String url, String token, Map params){ |
|
|
|
|
|
|
|
//CookieStore store= new BasicCookieStore(); |
|
|
|
//HttpClients.custom().setDefaultCookieStore(store).build(); |
|
|
|
|
|
|
|
// 定义HttpClient |
|
|
|
CloseableHttpClient client = HttpClients.createDefault(); |
|
|
|
|