Playing around with AbortController and Fetch API.
- Clone
npm installnpm start- Open http://localhost:8080 in the browser
Clicking on "Fetch" button sends request to /api endpoint, which has 10 seconds timeout for response. Clicking "Abort" - cancels the request if it's still pending.
MIT