|
@@ -46,6 +46,10 @@ public class HttpClientUtil {
|
|
|
}
|
|
|
|
|
|
public synchronized String put(String url, String content, Integer timeout, Map<String, String> headerMap) throws Exception {
|
|
|
+ if (Constant.http_interval > 0) {
|
|
|
+ Thread.sleep(Constant.http_interval);
|
|
|
+ }
|
|
|
+
|
|
|
HttpPut httpost = new HttpPut(url);
|
|
|
if (headerMap != null) {
|
|
|
for (String key : headerMap.keySet()) {
|
|
@@ -83,6 +87,10 @@ public class HttpClientUtil {
|
|
|
}
|
|
|
|
|
|
public synchronized String get(String url, Integer timeout, Map<String, String> headerMap) throws Exception {
|
|
|
+ if (Constant.http_interval > 0) {
|
|
|
+ Thread.sleep(Constant.http_interval);
|
|
|
+ }
|
|
|
+
|
|
|
HttpGet httpget = new HttpGet(url);
|
|
|
if (headerMap != null) {
|
|
|
for (String key : headerMap.keySet()) {
|
|
@@ -130,6 +138,10 @@ public class HttpClientUtil {
|
|
|
}
|
|
|
|
|
|
public synchronized String post(String url, String content, Integer timeout, Map<String, String> headerMap) throws Exception {
|
|
|
+ if (Constant.http_interval > 0) {
|
|
|
+ Thread.sleep(Constant.http_interval);
|
|
|
+ }
|
|
|
+
|
|
|
HttpPost httpost = new HttpPost(url);
|
|
|
if (headerMap != null) {
|
|
|
for (String key : headerMap.keySet()) {
|