基于Golang的HTTP客户端,爬虫工具direwolf

wnanbei · · 1301 次点击
收到,我去测试一下
#5
更多评论
如果客户端要维护长连接 该怎么写呢 https://wnanbei.github.io/direwolf/docs/tutorial#1-make-request 上没找到 另外如果发送 http头dw.NewHeaders( "Accept-Encoding", "gzip, deflate") 用 "compress/gzip" 的reader, err := gzip.NewReader(resp.Text()) 读取 ,提示 cannot use resp.Text() (type string) as type io.Reader in argument to gzip.NewReader: string does not implement io.Reader (missing Read method) 比如读这个页面 url="https://blog.csdn.net/yang731227/article/details/89338745" 读resp.Content() 提示 cannot use resp.Content() (type []byte) as type io.Reader in argument to gzip.NewReader: []byte does not implement io.Reader (missing Read method)
#2