You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (c *Client) do(req *Request) (retres *Response, reterr error) {
if testHookClientDoResult != nil {
defer func() { testHookClientDoResult(retres, reterr) }()
}
if req.URL == nil {
req.closeBody()
return nil, &url.Error{
Op: urlErrorOp(req.Method),
Err: errors.New("http: nil Request.URL"),
}
}
var (
deadline = c.deadline()
reqs []*Request
resp *Response
copyHeaders = c.makeHeadersCopier(req)
reqBodyClosed = false // have we closed the current req.Body?
// Redirect behavior:
redirectMethod string
includeBody bool
)
...
deadline is defined from httpClient.Timeout in resty's Client structure.
In other words, it appears that timeout can only be defined using SetTimeout() at the resty client level and that there are no other methods. func (c *Client) SetTimeout(timeout time.Duration) *Client {...}
Currently in Resty, can't each request generated from the same Resty Client have its own timeout?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
follow c.httpClient.Do Method..
deadline is defined from httpClient.Timeout in resty's Client structure.
In other words, it appears that timeout can only be defined using SetTimeout() at the resty client level and that there are no other methods.
func (c *Client) SetTimeout(timeout time.Duration) *Client {...}
Currently in Resty, can't each request generated from the same Resty Client have its own timeout?
Beta Was this translation helpful? Give feedback.
All reactions