askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
30 lines (29 loc) • 1.06 kB
TypeScript
import { OptionsOfJSONResponseBody } from 'got';
import http from 'http';
import https from 'https';
export declare class HttpClientGot {
readonly token?: string | undefined;
readonly customHeaders?: Record<string, string> | undefined;
private readonly cookies;
readonly proxyAgents?: {
http: http.Agent;
https: https.Agent;
} | undefined;
private headers;
private askuiGot;
urlsToRetry: string[];
constructor(token?: string | undefined, customHeaders?: Record<string, string> | undefined, cookies?: Record<string, string>, proxyAgents?: {
http: http.Agent;
https: https.Agent;
} | undefined);
private buildGotExtendOptions;
private shouldRetryOnError;
private shouldRetryPostRequest;
private initHeaders;
private injectHeadersAndCookies;
post<T>(url: string, data: Record<string | number | symbol, unknown>): Promise<{
headers: http.IncomingHttpHeaders;
body: T;
}>;
get<T>(url: string, options?: OptionsOfJSONResponseBody): Promise<T>;
}