This commit is contained in:
gospider
2025-03-24 16:58:37 +08:00
parent 2e471ea7f7
commit aa18032511
5 changed files with 30 additions and 48 deletions

View File

@@ -203,7 +203,7 @@ func (obj *Client) Request(ctx context.Context, method string, href string, opti
func (obj *Client) request(ctx *Response) (err error) {
defer func() {
//read body
if err == nil && !ctx.IsSSE() && !ctx.IsStream() {
if err == nil && ctx.sse == nil && !ctx.option.Stream {
err = ctx.ReadBody()
}
//result callback