| | |
| | | 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>(); |
| | |
| | | // 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"); |
| | |
| | | { |
| | | 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>(); |
| | |
| | | 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>(); |
| | |
| | | { |
| | | 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); |
| | |
| | | { |
| | | 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); |