Created
October 28, 2015 22:33
-
-
Save SystemZ/0401434d2a25356da46c to your computer and use it in GitHub Desktop.
Golang get http
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 main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
func main() { | |
for { | |
resp, err := http.Get("http://google.com") | |
fmt.Printf("%v", resp) | |
fmt.Printf("%v", err) | |
time.Sleep(3 * time.Second) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment