client := new(http.Client)
req, _ := http.NewRequest("GET", "https://www.xxx.com", nil)
res, _ := client.Do(req)
body := res.Body
b, _ := io.ReadAll(body)
fmt.Println(string(b))
client := new(http.Client)
req, _ := http.NewRequest("GET", "https://www.xxx.com", nil)
res, _ := client.Do(req)
body := res.Body
b, _ := io.ReadAll(body)
fmt.Println(string(b))
本文标题:go实现http客户端
本文链接:https://www.haomeiwen.com/subject/kwezartx.html
网友评论