Fetch sends an HTTP GET request to the specified URL and returns the response.
(url *url.URL, header http.Header)
| 33 | |
| 34 | // Fetch sends an HTTP GET request to the specified URL and returns the response. |
| 35 | func (c *FetchClient) Fetch(url *url.URL, header http.Header) (resp *http.Response, err error) { |
| 36 | return c.FetchWithContext(context.Background(), url, header) |
| 37 | } |
| 38 | |
| 39 | // FetchWithContext sends an HTTP GET request with cancellation support. |
| 40 | func (c *FetchClient) FetchWithContext(ctx context.Context, url *url.URL, header http.Header) (resp *http.Response, err error) { |
no test coverage detected