UNPKG

806 BTypeScriptView Raw
1/// <reference types="node" />
2import type { Fetch } from "./Fetch.js";
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 * Custom replacement for built-in fetch method. Useful for testing or request hooks.
9 */
10 fetch?: Fetch;
11 /**
12 * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
13 */
14 signal?: AbortSignal;
15 /**
16 * If set to `false`, the response body will not be parsed and will be returned as a stream.
17 */
18 parseSuccessResponseBody?: boolean;
19 redirect?: "follow" | "error" | "manual";
20 [option: string]: any;
21};