-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an API to set fetch timeout #910
Comments
Is there a difference when making a direct XHR request? |
Out fetch implementation doesn't set a timeout, so No. |
Timeout isn't in the fetch spec. Additionally, it's easy to add timeout support with some straightforward wrapper code: JakeChampion/fetch#175 (comment) |
|
Hurray :) |
Right, after wrapping fetch(url, {
timeout: 5000 // request timeout in ms
}).then(...); |
The snippet above give different results on Android and iOS. On Android fetch rejects in 127 sec, on iOS is 75 sec. These numbers are reproducible all the time.
The text was updated successfully, but these errors were encountered: