Skip to content

Glossary: Node.js Basics

AbortSignal.timeout

Also written: timeout

Creates a signal that cancels a `fetch` after a set time, such as `AbortSignal.timeout(5000)` for 5 seconds. It stops a request from hanging forever when the server doesn't answer.

Where the book teaches it

Related terms

fetch