1 发送get请求
func http_get(url string) string {
resp, err := http.Get(url)
if err != nil {
fmt.Println(err)
return ""
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
// resp.StatusCode
return string(body)[......]
Go执行网络请求
Leave a reply