Last active
February 18, 2020 15:50
-
-
Save noamt/7399f920d941b2b2f0e94cf9c6c46cba to your computer and use it in GitHub Desktop.
For blog post "Simulating SSL outages with Go"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package reachout | |
import ( | |
"fmt" | |
"net/http" | |
"os" | |
) | |
func ReachOut() string { | |
host := os.Getenv("API_HOST") | |
url := fmt.Sprintf("%s/api/ping", host) | |
resp, err := http.DefaultClient.Get(url) | |
// deal with response | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment