summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2018-03-21 18:57:55 +0000
committerNick White <git@njw.name>2018-03-21 18:57:55 +0000
commitc8053d860c703736f98bd17a1aec154e04364cfa (patch)
tree1e780f0961e87454c020def4f078455c194a2062
parent0765fa94a107369979ee8316afd2af8656f5489b (diff)
downloadweather-c8053d860c703736f98bd17a1aec154e04364cfa.tar.bz2
weather-c8053d860c703736f98bd17a1aec154e04364cfa.zip
Document why http.Get isnt used
-rw-r--r--weather.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weather.go b/weather.go
index 161fd7b..7ca592e 100644
--- a/weather.go
+++ b/weather.go
@@ -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)
}