|
@@ -134,7 +134,7 @@ public class HttpUtil {
|
|
|
HttpURLConnection conn = null;
|
|
HttpURLConnection conn = null;
|
|
|
try {
|
|
try {
|
|
|
String urlStr = buildUrlWithQueryString(url, queryParas);
|
|
String urlStr = buildUrlWithQueryString(url, queryParas);
|
|
|
- logger.info("get url:{}",urlStr);
|
|
|
|
|
|
|
+ logger.info("get请求url:{}",urlStr);
|
|
|
conn = getHttpConnection(connectTimeout, readTimeout,urlStr , GET,
|
|
conn = getHttpConnection(connectTimeout, readTimeout,urlStr , GET,
|
|
|
headers);
|
|
headers);
|
|
|
conn.connect();
|
|
conn.connect();
|
|
@@ -195,7 +195,7 @@ public class HttpUtil {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static String post(int connectTimeout, int readTimeout, String url, String data) {
|
|
public static String post(int connectTimeout, int readTimeout, String url, String data) {
|
|
|
- logger.info("请求url:{},参数:{}",url,data);
|
|
|
|
|
|
|
+ logger.info("post请求url:{},参数:{}",url,data);
|
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Content-Type", "application/json");
|
|
|
return post(connectTimeout, readTimeout, url, null, data, headers);
|
|
return post(connectTimeout, readTimeout, url, null, data, headers);
|