ragflow http请求 header处理

This commit is contained in:
2026-01-13 11:20:14 +08:00
parent a101d60df8
commit e7e450f7cf
2 changed files with 2 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ func doRequest(ctx context.Context, method string, url string, headers map[strin
defer response.Close() defer response.Close()
result := response.ReadAll() result := response.ReadAll()
resultStrut := &ghttp.DefaultHandlerResponse{} resultStrut := &ghttp.DefaultHandlerResponse{}
gconv.Struct(result, &resultStrut) gconv.Struct(result, &resultStrut)
if resultStrut.Code == 200 || resultStrut.Code == 0 { if resultStrut.Code == 200 || resultStrut.Code == 0 {
gconv.Struct(resultStrut.Data, target) gconv.Struct(resultStrut.Data, target)

View File

@@ -139,6 +139,7 @@ func (c *Client) request(ctx context.Context, method, path string, body interfac
if endpoint == "" { if endpoint == "" {
return gerror.New("RAGFlow endpoints not configured") return gerror.New("RAGFlow endpoints not configured")
} }
fullURL := endpoint + path fullURL := endpoint + path
// 添加详细日志:请求信息 // 添加详细日志:请求信息