Unable to connect api using golang
-
Get "https://myexternalip.com/raw": dial tcp 202.164.51.25:443: connectex: No connection could be made because the target machine actively refused it.
-
You can use this code
func getPublicIp() (string, error) { resp, err := http.Get("https://myexternalip.com/raw") if err != nil { return "", err } content, _ := ioutil.ReadAll(resp.Body) err = resp.Body.Close() if err != nil { return "", err } return string(content), nil }
-
Hello @GudHelp
Currently we are not supporting for GoLang but we are supporting for java,python and node
Regards,
SmartAPI Team