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 (
11
11
"fmt"
12
12
"io"
13
13
"net/http"
14
+ "net/http/cookiejar"
14
15
"net/url"
15
16
"time"
16
17
@@ -121,6 +122,13 @@ func (c *ClientConfig) Build() (*Client, error) {
121
122
122
123
httpClient := & prodClient {}
123
124
125
+ cookieJar , err := cookiejar .New (nil )
126
+ if err != nil {
127
+ return nil , err
128
+ }
129
+
130
+ httpClient .SetCookieJar (cookieJar )
131
+
124
132
if c .CustomRedirectPolicy != nil {
125
133
httpClient .SetRedirectPolicy (c .CustomRedirectPolicy )
126
134
}
Original file line number Diff line number Diff line change 1
1
package httpclient
2
2
3
3
import (
4
- "net/http/cookiejar"
5
4
"net/url"
6
5
)
7
6
8
7
// loadCustomCookies applies the custom cookies supplied in the config and applies them to the http session.
9
8
func (c * Client ) loadCustomCookies () error {
10
9
c .Sugar .Debug ("initilizing cookie jar" )
11
10
12
- cookieJar , err := cookiejar .New (nil )
13
- if err != nil {
14
- return err
15
- }
16
-
17
- c .http .SetCookieJar (cookieJar )
18
-
19
11
cookieUrl , err := url .Parse ((* c .Integration ).GetFQDN ())
20
12
c .Sugar .Debug ("cookie URL set globally to: %s" , cookieUrl )
21
13
if err != nil {
You can’t perform that action at this time.
0 commit comments