1 | import { RequestInit, Response } from "node-fetch";
|
2 | export interface IRequestContext {
|
3 | "description"?: string;
|
4 | }
|
5 | export interface IProxy {
|
6 | "host": string;
|
7 | "port": string;
|
8 | "protocol": string;
|
9 | "secureProxy": boolean;
|
10 | "proxyAuthorizationHeader"?: string;
|
11 | }
|
12 | export interface IHttpClientOptions {
|
13 | "authorizationHeader"?: string;
|
14 | "logRequestResponse"?: boolean;
|
15 | "proxy"?: IProxy;
|
16 | "origin"?: string;
|
17 | }
|
18 | export declare class HttpClient {
|
19 | private proxy?;
|
20 | private authorizationHeader?;
|
21 | private logRequestResponse;
|
22 | private origin;
|
23 | constructor(options: IHttpClientOptions);
|
24 | getHttpResponse(url: string, requestInit: RequestInit, expectedHttpStatusCode: number[], context: IRequestContext): Promise<Response>;
|
25 | }
|