req icon indicating copy to clipboard operation
req copied to clipboard

Simple Go HTTP client with Black Magic

Results 65 req issues
Sort by recently updated
recently updated
newest added

在使用 HTTP/2 时,经常触发 `http2: Transport received Server's graceful shutdown GOAWAY` 错误,请问我该如何处理掉这个错误?

```go var repsClient = req.C(). SetBaseURL("https://sc.scm121.com/api").SetCommonContentType("application/json; charset=utf-8"). SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36"). SetTimeout(1 * time.Minute).EnableDumpAllToFile("./runtime/dumpReq.txt") func (c Content) RequestGet(url string, urlParams map[string]string) (JSON,...

There is a small mistake in the [Get Response body](https://req.cool/docs/tutorial/handle-response/#get-response-body-as-string-or-byte) in the documentation. More specific the example for the `ToBytes()` is: ```go body, err := resp.ToString() if err != nil...

``` go func TestHttps(t *testing.T) { c := req.C().EnableDumpAll().SetBaseURL("https://httpbin.org") r := c.R() r.SetHeadersNonCanonical(map[string]string{ "USID": "123", // 用户 ID }) r.SetHeaderNonCanonical("CTERMINAL", "ui") res, _ := r.Post("/post") t.Log(res.String()) } /* :authority: httpbin.org...

http1.1、http2都支持SetTLSFingerprint,那么http3有计划支持吗?目前看是不支持的