cavaliergopher / grab

A download manager package for Go
BSD 3-Clause "New" or "Revised" License
1.38k stars 151 forks source link

Unresolved: client.HTTPClient.Transport #79

Open duglaskl opened 4 years ago

duglaskl commented 4 years ago

Hi,

at 2017 we implemented a solution like this: https://github.com/cavaliercoder/grab/issues/17

We updated our project, recently. Now there ist an error message at client.HTTPClient.Transport = &http.Transport{

The client.HTTPClient.Transport is an unresolved reference. How we can get it to work now?

lucantolinos commented 2 years ago

Here is the code adapted from the grab source, where the default client is created (here added TLS disabling for localhost HTTPs in my case)

  client.HTTPClient = &http.Client{
      Transport: &http.Transport{
          Proxy:           http.ProxyFromEnvironment,
          TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
      }