shad-go/lectures/06-http/simpleget/simpleget.go
2020-04-02 17:01:16 +03:00

15 lines
194 B
Go

package main
import (
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://golang.org")
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
}