File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "fmt"
1212 "io"
1313 "net/http"
14+ "net/http/cookiejar"
1415 "net/url"
1516 "time"
1617
@@ -121,6 +122,13 @@ func (c *ClientConfig) Build() (*Client, error) {
121122
122123 httpClient := & prodClient {}
123124
125+ cookieJar , err := cookiejar .New (nil )
126+ if err != nil {
127+ return nil , err
128+ }
129+
130+ httpClient .SetCookieJar (cookieJar )
131+
124132 if c .CustomRedirectPolicy != nil {
125133 httpClient .SetRedirectPolicy (c .CustomRedirectPolicy )
126134 }
Original file line number Diff line number Diff line change 11package httpclient
22
33import (
4- "net/http/cookiejar"
54 "net/url"
65)
76
87// loadCustomCookies applies the custom cookies supplied in the config and applies them to the http session.
98func (c * Client ) loadCustomCookies () error {
109 c .Sugar .Debug ("initilizing cookie jar" )
1110
12- cookieJar , err := cookiejar .New (nil )
13- if err != nil {
14- return err
15- }
16-
17- c .http .SetCookieJar (cookieJar )
18-
1911 cookieUrl , err := url .Parse ((* c .Integration ).GetFQDN ())
2012 c .Sugar .Debug ("cookie URL set globally to: %s" , cookieUrl )
2113 if err != nil {
You can’t perform that action at this time.
0 commit comments