This commit is contained in:
Cold
2026-01-17 17:58:13 +08:00
committed by 张斌
parent 138b81640c
commit 02e75e57da
5 changed files with 49 additions and 15 deletions

View File

@@ -149,7 +149,7 @@ func (c *Client) request(ctx context.Context, method, path string, body interfac
g.Log().Infof(ctx, "RAGFlow请求体: %s", bodyJSON)
}
// 创建新的HTTP客户端实例避免共享状态
// 使用common/http包
var headers = make(map[string]string)
headers["Authorization"] = "Bearer " + c.APIKey
headers["Content-Type"] = "application/json"
@@ -161,7 +161,6 @@ func (c *Client) request(ctx context.Context, method, path string, body interfac
case "PUT":
err = http.Put(ctx, fullURL, headers, result, body)
case "DELETE":
if body != nil {
err = http.Delete(ctx, fullURL, headers, result, body)
} else {