mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
method bug
This commit is contained in:
@@ -49,7 +49,8 @@ Requests is a fully featured HTTP client library for Golang. Network requests ca
|
||||
* [DNS Settings](https://github.com/gospider007/requests/blob/master/test/dns_test.go)
|
||||
* [Proxy](https://github.com/gospider007/requests/blob/master/test/proxy_test.go)
|
||||
* [Well tested client library](https://github.com/gospider007/requests/tree/master/test)
|
||||
* [Benchmark](https://github.com/gospider007/benchmark)
|
||||
## [Benchmark](https://github.com/gospider007/benchmark)
|
||||
[gospider007/requests](https://github.com/gospider007/requests) > [imroc/req](github.com/imroc/req) > [go-resty](github.com/go-resty/resty) > [wangluozhe/requests](github.com/wangluozhe/requests) > [curl_cffi](https://github.com/yifeikong/curl_cffi) > [httpx](https://github.com/encode/httpx) > [psf/requests](https://github.com/psf/requests)
|
||||
## Supported Go Versions
|
||||
Recommended to use `go1.21.3` and above.
|
||||
Initially Requests started supporting `go modules`
|
||||
|
||||
@@ -235,6 +235,9 @@ func (obj *Client) Request(ctx context.Context, method string, href string, opti
|
||||
return
|
||||
}
|
||||
}
|
||||
if optionBak.Method == "" {
|
||||
optionBak.Method = method
|
||||
}
|
||||
for maxRetries := 0; maxRetries <= optionBak.MaxRetries; maxRetries++ {
|
||||
option := optionBak
|
||||
response, err = obj.request(ctx, &option)
|
||||
|
||||
Reference in New Issue
Block a user