Skip to content

Support AbortController #1511

@sindresorhus

Description

@sindresorhus

Node.js 15 now supports AbortController and it makes sense for us to support it in Got. While I'm personally not a big fan of its overly verbose way of handling cancellation, it seems to become the de-facto way of handling cancellation going forward.

I think we should still retain the current .cancel() method if possible.

https://medium.com/@nodejs/node-js-v15-0-0-is-here-deb00750f278
https://developer.mozilla.org/en-US/docs/Web/API/AbortController
nodejs/node@8390f8a86b

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis change will extend Got featuresfutureThe issue will be worked on in the future✭ help wanted ✭

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions