req
req copied to clipboard
Simple Go HTTP client with Black Magic
``` SetHeaders(map[string]string{ "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", 省略... ``` 这是日志 ``` upgrade-insecure-requests: 1 user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36...
1. 改进获取HTTP摘要信息的获取函数 2. 解决未遵循RFC规范,缺少qop参数导致的报错的问题
Dear @imroc My server is using zap logger. The logger is set to log correlation id of every inbound http request. My handlers for handling these inbound http requests use...
比如上传文件, 中途可以取消吗?
package main import ( "fmt" "net/http" "net/http/cookiejar" "golang.org/x/net/publicsuffix" "github.com/imroc/req/v3" ) func main() { jar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List}) c := req.C().SetCookieJar(jar) r := c.R() resp, _ := r.Get("https://httpbingo.org/cookies/set?b=2") fmt.Println(resp.String()) r.SetCookies(&http.Cookie{...
代码: reader, _ := gzip.NewReader(response.Response.Body)//body是经过gzip压缩的json all, _ := io.ReadAll(reader)//这里会panic ================================================== 报错:panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x280 pc=0xa6ef62] goroutine 1 [running]: compress/gzip.(*Reader).Read(0xffffffffffffffff?, {0xc00021e000?,...
utls已经更新ECH的支持 ,能否同步更新一下
Using ImpersonateChrome instead works fine. ```go package main import ( "fmt" "log" "github.com/imroc/req/v3" ) func main(){ client := req.C().ImpersonateFirefox() // tls: invalid signature by the server certificate: ECDSA verification failure...
所有的参数都跟网页一样的情况下,无论是GET还是POST请求都返回了状态码 403。