go-resty / resty

Simple HTTP and REST client library for Go
MIT License
9.89k stars 696 forks source link

Is the `SetTimeout()` respected by the default context? #742

Closed rew1nter closed 6 months ago

rew1nter commented 10 months ago

What is the timeout set for the default context? When sending requests at a large scale I was getting the error Context deadline exceeded despite having provided a large settimeout value. In this case do I have to manually set the context to background for settimeout to be respected?

jeevatkm commented 6 months ago

@rew1nter No, you could take control with own context via Request.SetContext