req
req copied to clipboard
Simple Go HTTP client with Black Magic
``` r:=req.C().DevMode() r.OnBeforeRequest(func(client *req.Client, request *req.Request) error { if request.Method == "POST" { fmt.Printf("%+v", request) } } postBody:="123" r.R().SetResult(&resp).SetBody(&postBody).Post("xxxxxx") ``` 输出的信息里面没有postBody的内容 RawURL:xxxxxx Method:POST Body:[] GetBody: URL:
比如这个网站:https://www.sjzpc.edu.cn/ 浏览器可以看到内容,但是用req无法抓取到内容,就算启用了http指纹也不行
功能建议
首先非常感谢作者的辛勤付出,req库用起来确实比同类http客户端好用多了。但是,在实际需求中还是感觉还有以下几个功能点是需要用到的,烦请作者考虑支持,谢谢 1. pipeline模式,http 1.1开始的一种模式 2. 自定义http2指纹,更加开放各层协议各细节的自定义程度(可参考https://github.com/wangluozhe/requests库) 3. 支持tcp连接缓存,进一步加快访问速度和降低内存占用 以上功能还请作者考虑添加,提前感谢
Is there any benchmark data that we can refer?
例如使用HTTP摘要认证登陆华为设备会提示:digest: qop must be specified 华为设备返回的摘要信息如下: WWW-Authenticate: Digest realm="Huawei",nonce="66f38e5ec6ebedc7c65c16f1c0ea3f46", algorithm=SHA-256
req使用带密码验证的http/socks5代理, 并开启EnableForceHTTP1 + ImpersonateChrome 服务器会返回:@@d?"missing connection preface connection preface应该是HTTP2才有的。 req使用带密码验证的http/socks5代理 + 去掉ImpersonateChrome就正常。 req使用带密码验证的http/socks5代理 + 去掉EnableForceHTTP1, 则报错connection error: COMPRESSION_ERROR
Hi, is it possible to implement a bandwith limiter for downloading or uploading? Like .**SetBWLimit**("1024") or something else, so that is possible to limit the download or upload speed? Best...
Hi, i think there is a bug or something in your implementation, because if i want to upload a file here against this API: https://rapidgator.net/article/api/file#upload **v3 - bad memory usage...