Commit feb1de3d authored by wanjilong's avatar wanjilong

add: 修复traceId 不一致问题

parent a7bc4caa
......@@ -61,7 +61,7 @@ class HttpUtil
{
// 增加traceId
if(is_array($headers)) {
$headers['X-TRACE-ID'] = Tracer::getTraceId();
$headers[] = 'X-TRACE-ID: ' . Tracer::getTraceId();
}
$url = $url ."?". http_build_query($params);
return self::curl($url, $timeout, $retries, $headers, [], $proxy, 'GET', $curl_opts);
......@@ -97,7 +97,7 @@ class HttpUtil
{
// 增加traceId
if(is_array($headers)) {
$headers['X-TRACE-ID'] = Tracer::getTraceId();
$headers[] = 'X-TRACE-ID: ' . Tracer::getTraceId();
}
return self::curl($url, $timeout, $retries, $headers, $post, $proxy, 'POST', $curl_opts);
}
......
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