GoLang 通过http Post获取数据
摘要:
func GetPostResponse(url, bodyType string, body *[]byte) (rdata []byte, err error) { b := bytes.NewBuffer(*body) var r *http.Response r, err = http.Post(url, bodyType, b) if err == nil { rbody := (*r).Body defer rbody.Close() var nRead int nRead, err = rbody.Read(rdata) if err != nil { Debug(... 阅读全文
posted @ 2014-04-08 20:17 拾贝杂苑 阅读(5100) 评论(0) 推荐(0) 编辑