From 4c64dca2491f0ae298ee160c1e8df22448a588ae Mon Sep 17 00:00:00 2001 From: Administrator <hbal> Date: 星期六, 15 四月 2023 12:44:37 +0800 Subject: [PATCH] 明晟webservice --- JavaSource/com/mandi/common/Wxhtmethod.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/JavaSource/com/mandi/common/Wxhtmethod.java b/JavaSource/com/mandi/common/Wxhtmethod.java index 422be13..5549a56 100644 --- a/JavaSource/com/mandi/common/Wxhtmethod.java +++ b/JavaSource/com/mandi/common/Wxhtmethod.java @@ -113,7 +113,7 @@ JsonObject jo=new JsonObject(); CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); String re=null; List<NameValuePair> fps=new ArrayList<NameValuePair>(); @@ -179,7 +179,7 @@ // s.setContentEncoding("UTF-8"); // hp.setEntity(s); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); StringEntity se=new StringEntity(jsonStr, Charset.forName("utf-8")); se.setContentType("application/json"); @@ -281,7 +281,7 @@ { CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); String re=null; List<NameValuePair> fps=new ArrayList<NameValuePair>(); @@ -321,7 +321,7 @@ CloseableHttpClient httpclient=nssl(); // CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); String re=null; List<NameValuePair> fps=new ArrayList<NameValuePair>(); @@ -361,7 +361,7 @@ { CloseableHttpClient httpclient=nssl(); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); MultipartEntityBuilder me=MultipartEntityBuilder.create(); me.addBinaryBody(upfilename, file); @@ -397,7 +397,7 @@ { CloseableHttpClient httpclient=nssl(); HttpPost hp=new HttpPost(url); - RequestConfig config = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).build(); + RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build(); hp.setConfig(config); StringEntity se=new StringEntity(body, Charset.forName("utf-8")); hp.setEntity(se); -- Gitblit v1.9.3