|
@@ -340,11 +340,14 @@ public class HttpUtils {
|
|
|
String strReturn = "";
|
|
|
try {
|
|
|
HttpPost httppost = new HttpPost(url);
|
|
|
+ RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(12000).setConnectTimeout(12000).build();
|
|
|
+ httppost.setConfig(requestConfig);
|
|
|
if (!Check.isNullMap(headers)) {
|
|
|
for (String key : headers.keySet()) {
|
|
|
httppost.setHeader(key, headers.get(key));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
httppost.setHeader("User-Agent", USER_AGENT);
|
|
|
if (!Check.isNull(body)) {
|
|
|
httppost.setEntity(new StringEntity(body, Charset.forName("UTF-8")));
|