diff --git a/README.md b/README.md index 38795c4..81f5b64 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/requests.go b/requests.go index 0b7a089..7a09642 100644 --- a/requests.go +++ b/requests.go @@ -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)