We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RequestUse 只是示例,真实代码中没有这个
gout.New(). WithContext(ctx). SetTimeout(time.Second*100). SetURL("http://xxxx"). SetBody("22222"). // 不能放在SetMethod的前面 SetMethod("POST"). RequestUse(middler.WithRequestMiddlerFunc(func(req *http.Request) error { bytes, _ := io.ReadAll(req.Body) // 读取不到任何数据 return nil })) Do();
gout.New(). WithContext(ctx). SetTimeout(time.Second*100). SetURL("http://xxxx"). SetMethod("POST"). SetBody("22222"). RequestUse(middler.WithRequestMiddlerFunc(func(req *http.Request) error { bytes, _ := io.ReadAll(req.Body) // 可以读取到数据 return nil })) Do();
The text was updated successfully, but these errors were encountered:
感谢发现了这个问题,看了下代码,是SetURL目前的实现会reset一些状态。 明天中午我改下。
Sorry, something went wrong.
试下master最新代码呢。提交了一个pr,如果没有问题,晚上回去打个tag。
No branches or pull requests
RequestUse 只是示例,真实代码中没有这个
错误的示例
正确的做法
The text was updated successfully, but these errors were encountered: