Administrator
2023-04-14 cc0cbfc79a34e1b106fdb998450cd2ad03446126
JavaSource/com/mandi/common/Wxhtmethod.java
@@ -12,6 +12,7 @@
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
@@ -112,6 +113,8 @@
       JsonObject jo=new JsonObject();
       CloseableHttpClient httpclient = HttpClients.createDefault();
       HttpPost hp=new HttpPost(url);
      RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
      hp.setConfig(config);
       String re=null;
       List<NameValuePair> fps=new ArrayList<NameValuePair>();
       UrlEncodedFormEntity entity=null;
@@ -176,6 +179,8 @@
//          s.setContentEncoding("UTF-8");
//          hp.setEntity(s);
          HttpPost hp=new HttpPost(url);
          RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
          hp.setConfig(config);
          StringEntity se=new StringEntity(jsonStr, Charset.forName("utf-8"));
          se.setContentType("application/json");
          hp.setEntity(se);
@@ -276,6 +281,8 @@
   {
       CloseableHttpClient httpclient = HttpClients.createDefault();
       HttpPost hp=new HttpPost(url);
      RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
      hp.setConfig(config);
       String re=null;
       List<NameValuePair> fps=new ArrayList<NameValuePair>();
       UrlEncodedFormEntity entity=null;
@@ -314,6 +321,8 @@
       CloseableHttpClient httpclient=nssl();
      // CloseableHttpClient httpclient = HttpClients.createDefault();
       HttpPost hp=new HttpPost(url);
      RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
      hp.setConfig(config);
       String re=null;
       List<NameValuePair> fps=new ArrayList<NameValuePair>();
       UrlEncodedFormEntity entity=null;
@@ -352,6 +361,8 @@
   {
       CloseableHttpClient httpclient=nssl();
       HttpPost hp=new HttpPost(url);
      RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
      hp.setConfig(config);
       MultipartEntityBuilder me=MultipartEntityBuilder.create();
       me.addBinaryBody(upfilename, file);
       if(params!=null)
@@ -386,6 +397,8 @@
   {
       CloseableHttpClient httpclient=nssl();
       HttpPost hp=new HttpPost(url);
      RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build();
      hp.setConfig(config);
       StringEntity se=new StringEntity(body, Charset.forName("utf-8"));
       hp.setEntity(se);
       String re=null;