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
With the current system, a req is retried infinitely until we get a success response. Accepting a timeout would be good to break the loop of retrying.
Faced this recently when writing a few jest tests, where I wanted the request to succeed but only wait for a certain time and let the request timeout after that.
@sindresorhus
what do you think about the resolved value of { started: true/false }?. While it may not be useful for everyone, this came in handy when people want to explicitly assert whether request succeeded/failed, especially when using the timeout.
With the current system, a req is retried infinitely until we get a success response. Accepting a timeout would be good to break the loop of retrying.
Faced this recently when writing a few jest tests, where I wanted the request to succeed but only wait for a certain time and let the request timeout after that.
Something like this?
The text was updated successfully, but these errors were encountered: