UNPKG

807 BTypeScriptView Raw
1import type { Fetch } from "./Fetch";
2import type { 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 * 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?: Signal;
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};