feat:请求头日志添加
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.xiang.xservice.basic.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
@@ -60,7 +61,7 @@ public class HttpUtils {
|
||||
CloseableHttpResponse response = null;
|
||||
String result = "";
|
||||
try {
|
||||
log.info("HTTP请求,请求地址===>{}, 请求参数===>{}", url, jsonParams);
|
||||
log.info("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.addHeader("Content-Type", "application/json");
|
||||
// 创建请求内容
|
||||
|
||||
Reference in New Issue
Block a user