MCPcopy
hub / github.com/sindresorhus/got / signal

Method signal

source/core/options.ts:2099–2101  ·  view source on GitHub ↗

You can abort the `request` using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). @example ``` import got from 'got'; const abortController = new AbortController(); const request = got('https://httpbin.org/anything', { signal: abortController.signal

()

Source from the content-addressed store, hash-verified

2097 ```
2098 */
2099 get signal(): AbortSignal | undefined {
2100 return this.#internals.signal;
2101 }
2102
2103 set signal(value: AbortSignal | undefined) {
2104 assertAny('signal', [is.object, is.undefined], value);

Callers

nothing calls this directly

Calls 1

assertAnyFunction · 0.85

Tested by

no test coverage detected