更新
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user