I\'m making a URL fetcher in Go and have a list of URLs to fetch. I send http.Get() requests to each URL and obtain their response.
http.Get()
resp,fetch_e
If you want to do it per request, err handling ignored for brevity:
ctx, cncl := context.WithTimeout(context.Background(), time.Second*3) defer cncl() req, _ := http.NewRequestWithContext(ctx, http.MethodGet, "https://google.com", nil) resp, _ := http.DefaultClient.Do(req)