记得上下班打卡 | git大法好,push需谨慎

Commit 07c982a8 authored by jiangxiulong's avatar jiangxiulong

!CollectionUtils.isEmpty(header)

parent 44245cf8
...@@ -72,13 +72,13 @@ public class HttpsUtils { ...@@ -72,13 +72,13 @@ public class HttpsUtils {
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
// 设置头信息 // 设置头信息
if (CollectionUtils.isEmpty(header)) { if (!CollectionUtils.isEmpty(header)) {
for (Map.Entry<String, String> entry : header.entrySet()) { for (Map.Entry<String, String> entry : header.entrySet()) {
httpPost.addHeader(entry.getKey(), entry.getValue()); httpPost.addHeader(entry.getKey(), entry.getValue());
} }
} }
// 设置请求参数 // 设置请求参数
if (CollectionUtils.isEmpty(param)) { if (!CollectionUtils.isEmpty(param)) {
List<NameValuePair> formparams = new ArrayList<NameValuePair>(); List<NameValuePair> formparams = new ArrayList<NameValuePair>();
for (Map.Entry<String, String> entry : param.entrySet()) { for (Map.Entry<String, String> entry : param.entrySet()) {
//给参数赋值 //给参数赋值
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment