SetCookieJar sets the cookie jar for the client.
(cookieJar *CookieJar)
| 700 | |
| 701 | // SetCookieJar sets the cookie jar for the client. |
| 702 | func (c *Client) SetCookieJar(cookieJar *CookieJar) *Client { |
| 703 | c.mu.Lock() |
| 704 | defer c.mu.Unlock() |
| 705 | |
| 706 | c.cookieJar = cookieJar |
| 707 | return c |
| 708 | } |
| 709 | |
| 710 | // Get sends a GET request to the specified URL, similar to axios. |
| 711 | func (c *Client) Get(url string, cfg ...Config) (*Response, error) { |