UNPKG

973 BTypeScriptView Raw
1import { Fetch } from "./Fetch";
2import { Signal } from "./Signal";
3/**
4 * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled
5 */
6export type RequestRequestOptions = {
7 /**
8 * Node only. Useful for custom proxy, certificate, or dns lookup.
9 *
10 * @see https://nodejs.org/api/http.html#http_class_http_agent
11 */
12 agent?: unknown;
13 /**
14 * Custom replacement for built-in fetch method. Useful for testing or request hooks.
15 */
16 fetch?: Fetch;
17 /**
18 * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
19 */
20 signal?: Signal;
21 /**
22 * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead.
23 */
24 timeout?: number;
25 [option: string]: any;
26};