From 6719d8ba70eada30405c38b36e68532b3d136be7 Mon Sep 17 00:00:00 2001 From: Dean Roker Date: Fri, 1 Mar 2024 23:57:09 +0000 Subject: [PATCH] fixes rumble loop --- request/request.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/request/request.go b/request/request.go index a887b73b4..89d3bf27d 100644 --- a/request/request.go +++ b/request/request.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "net/http/cookiejar" "strconv" "strings" "time" @@ -54,9 +55,14 @@ func Request(method, url string, body io.Reader, headers map[string]string) (*ht TLSHandshakeTimeout: 10 * time.Second, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } + jar, err := cookiejar.New(nil) + if err != nil { + return nil, errors.WithStack(err) + } client := &http.Client{ Transport: transport, Timeout: 15 * time.Minute, + Jar: jar, } req, err := http.NewRequest(method, url, body)