UNPKG

1.2 kBPlain TextView Raw
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
8import { FetchOptions } from "./IFetchOptions";
9import { MiddlewareControl } from "./middleware/MiddlewareControl";
10
11/**
12 * @interface
13 * @property {RequestInfo} request - The request url string or the Request instance
14 * @property {FetchOptions} [options] - The options for the request
15 * @property {Response} [response] - The response content
16 * @property {MiddlewareControl} [middlewareControl] - The options for the middleware chain
17 * @property {Set<string>}[customHosts] - A set of custom host names. Should contain hostnames only.
18 *
19 */
20
21export interface Context {
22 request: RequestInfo;
23 options?: FetchOptions;
24 response?: Response;
25 middlewareControl?: MiddlewareControl;
26 /**
27 * Example - If URL is "https://test_host", then set property "customHosts" as "customHosts: Set<string>(["test_host"])"
28 */
29 customHosts?: Set<string>;
30}