diff options
author | Nick White <git@njw.name> | 2018-03-21 18:57:55 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2018-03-21 18:57:55 +0000 |
commit | c8053d860c703736f98bd17a1aec154e04364cfa (patch) | |
tree | 1e780f0961e87454c020def4f078455c194a2062 | |
parent | 0765fa94a107369979ee8316afd2af8656f5489b (diff) | |
download | weather-c8053d860c703736f98bd17a1aec154e04364cfa.tar.bz2 weather-c8053d860c703736f98bd17a1aec154e04364cfa.zip |
Document why http.Get isnt used
-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) } |