golang常用的http请求操作
golang发起GET请求 基本的GET请求 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 package main import ( "fmt" "io/ioutil" "net/http" ) func main() { resp, err := http.Get("http://httpbin.org/get") if err != nil { fmt.Println(err) return } defer resp.Body.Close() body, err