INNER CODE UNIT · Go

main

mozillazg/ptcpdump · testdata/gohttpapp/main.go:9

func main() {
	resp, err := http.Get("https://gobyexample.com/foo/bar")
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…