buf := new(bytes.Buffer)
buf.ReadFrom(r.Body)
fmt.Println(buf.String())
//第二种方式
res,_:=ioutil.ReadAll(r.Body)
fmt.Println(string(res))
go两种方式读取http.Request数据
猜你喜欢
转载自hhg08.iteye.com/blog/2304869
今日推荐
周排行