-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support timeout on fetch requests #1
Labels
enhancement
New feature or request
Comments
stefan-guggisberg
added a commit
that referenced
this issue
Feb 3, 2020
trieloff
pushed a commit
that referenced
this issue
Feb 3, 2020
# [1.1.0](v1.0.0...v1.1.0) (2020-02-03) ### Features * support timeout on fetch requests; doc and test ([ce6c1ce](ce6c1ce)), closes [#1](#1)
supported in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Running multiple fetch requests in parallel may end up causing denial-of-service attacks if they are long-lived.
Describe the solution you'd like
Regular XHR requests support a timeout that will fail the request after a specific amount of time.
There is currently no clear spec for it in the fetch API, but some discussion around it exist (see links below)
Would be great to have a first draft implementation in the library to offer a decent enough implementation until the spec is finalized.
Describe alternatives you've considered
This can alternatively be implemented consumer-side by using timeouts and promises, and rejecting the promise before the request ends, but the socket is still left open until the fetch actually finishes so it doesn't fully removes the issue
Additional context
See:
The text was updated successfully, but these errors were encountered: