Go 学习笔记(76)— Go 标准库 net/http 创建客户端(发送 GET、POST 请求)
1.Get请求1.1使用net/http包的快捷方法GETpackagemainimport("fmt""io/ioutil""net/http")funcmain(){resp,err:=http.Get("http://www.baidu.com")iferr!=nil{fmt.Println(err)}deferresp.Body.Close()body,err:=ioutil.ReadAl