diff options
-rw-r--r-- | weather.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -41,10 +41,9 @@ func main() { id = defid } - tr := &http.Transport{} - client := &http.Client{Transport: tr} + // Use http.Client.Get as http.Get doesn't seem to handle TLS + client := &http.Client{Transport: &http.Transport{}} resp, err := client.Get("https://www.metoffice.gov.uk/public/data/PWSCache/BestForecast/Forecast/" + id + ".json?concise=true") - //resp, err := http.Get("https://www.metoffice.gov.uk/public/data/PWSCache/BestForecast/Forecast/" + id + ".json?concise=true") if err != nil { log.Fatal(err) } |