]> 127.0.0.1 Git - part/.git/commitdiff
add v0.28.0+20230712e14fd2b
authorqydysky <qydysky@foxmail.com>
Wed, 12 Jul 2023 13:58:59 +0000 (21:58 +0800)
committerqydysky <qydysky@foxmail.com>
Wed, 12 Jul 2023 13:58:59 +0000 (21:58 +0800)
reqf/Reqf.go

index 97b714ccd60661d47f02034e62aaa39085af9770..1b87f6409ced3367a2cbc2aaf4a9799f35c129a3 100644 (file)
@@ -181,11 +181,10 @@ func (t *Req) Reqf_1(ctx context.Context, val Rval) (err error) {
                }
        }
 
-       req, e := http.NewRequest(Method, val.Url, body)
+       req, e := http.NewRequestWithContext(ctx, Method, val.Url, body)
        if e != nil {
                return errors.Join(ErrNewRequest, e)
        }
-       req = req.WithContext(ctx)
 
        for _, v := range val.Cookies {
                req.AddCookie(v)