Skip to content
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

AbortSignal should abort response body #599

Open
mwatson2 opened this issue Jan 12, 2021 · 0 comments
Open

AbortSignal should abort response body #599

mwatson2 opened this issue Jan 12, 2021 · 0 comments

Comments

@mwatson2
Copy link

According to fetch http-network-fetch, Step 7, reception of the response body should be aborted if the AbortSignal provided to the original call to fetch fires. In node-fetch, this is implemented here, by destroying the stream. Notably, this happens outside the Response object.

Unless I missed it, fetch-mock does not do this and the AbortSignal only aborts the initial step of resolving the promise returned by fetch with the Response object.

I'm happy to provide a PR to resolve this, if the issue is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant