summaryrefslogtreecommitdiff
path: root/weather.go
diff options
context:
space:
mode:
Diffstat (limited to 'weather.go')
-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)
}