1 | /**
|
2 | * -------------------------------------------------------------------------------------------
|
3 | * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
|
4 | * See License in the project root for license information.
|
5 | * -------------------------------------------------------------------------------------------
|
6 | */
|
7 | /**
|
8 | * @interface {@link https://github.com/bitinn/node-fetch/#options}
|
9 | * Signature to define the fetch request options for node environment
|
10 | * @property {number} [follow] - Maximum redirect count. 0 to not follow redirect
|
11 | * @property {number} [timeout] - Request/Response timeout in milliseconds, it resets on redirect. 0 to disable (OS limit applies)
|
12 | * @property {number} [compress] - Support gzip/deflate content encoding. false to disable
|
13 | * @property {number} [size] - Maximum response body size in bytes. 0 to disable
|
14 | * @property {any} [agent] - HTTP(S).Agent instance, allows custom proxy, certificate, lookup, family etc.
|
15 | */
|
16 | export interface NodeFetchInit {
|
17 | follow?: number;
|
18 | timeout?: number;
|
19 | compress?: boolean;
|
20 | size?: number;
|
21 | agent?: any;
|
22 | }
|
23 | /**
|
24 | * @interface
|
25 | * Signature to define the fetch api options which includes both fetch standard options and also the extended node fetch options
|
26 | * @extends RequestInit @see {@link https://fetch.spec.whatwg.org/#requestinit}
|
27 | * @extends NodeFetchInit
|
28 | */
|
29 | export interface FetchOptions extends RequestInit, NodeFetchInit {
|
30 | }
|