UNPKG

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