Open Fuzion24 opened 4 years ago
This patch disables tls vadlidation and causes it to work again, but is obviously bad.
diff --git a/main.go b/main.go
index 021eb53..4d8f8e2 100644
--- a/main.go
+++ b/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "crypto/tls"
"encoding/json"
"fmt"
"log"
@@ -39,6 +40,7 @@ func main() {
}, "")
// query the coinmarketcap API
+ http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
response, err := http.Get(url)
if err != nil {
log.Fatalln(err)
Oh, well this is pretty annoying. Pull it up in a browser: http://api.coinmarketcap.com/
WARNING: This API is now deprecated and will be taken offline soon. Please switch to the new CoinMarketCap API to avoid interruptions in service. (https://pro.coinmarketcap.com/migrate/)
I'll take a look at the new docs when I have the time. Hopefully it won't be a huge amount of work to reconfigure against the new API :/
Thanks for bringing this to my attention.
The old API officially died today :<