fix: 修复 Client() 返回过时 HTTPClient 的问题

- 将 Client() 从返回 c.HTTPClient 改为返回 c.engine.HTTPClient
- 与 HTTPC() 方法保持一致
This commit is contained in:
wjqserver 2026-04-22 07:30:40 +08:00
parent 4f262b2497
commit e7c7d5e41f

View file

@ -869,7 +869,7 @@ func (c *Context) GetErrors() []error {
//
// Deprecated: 使用 HTTPC() 替代,新方法会自动关联请求 Context
func (c *Context) Client() *httpc.Client {
return c.HTTPClient
return c.engine.HTTPClient
}
// HTTPC 返回自动关联请求 Context 的 HTTP 客户端