import { RequestOptions } from 'http'; import { FollowOptions } from 'follow-redirects'; import { Writable } from 'stream'; import { SecureContextOptions } from 'tls'; import { StatOptions, Stats } from 'fs'; export interface ResponseInfo { bomDetected?: boolean; bomRemoved?: boolean; cachePath?: string; callback?: string; charset?: string; contentEncoding?: string; contentLength?: number; contentType?: string; fromCache?: boolean; stream?: Writable; } type ReqOptions = (RequestOptions & SecureContextOptions & { rejectUnauthorized?: boolean; servername?: string; } & FollowOptions); export interface ExtendedRequestOptions extends ReqOptions { autoDecompress?: boolean; body?: Buffer | string; cachePath?: string; dontDecompress?: boolean; dontEndStream?: boolean; followRedirects?: boolean; forceEncoding?: boolean; ignoreBom?: boolean; json?: any; keepBom?: boolean; maxBodyLength?: number; maxCacheAge?: number; maxRedirects?: number; params?: string | Record; progress?: (bytesRead: number, totalBytes: number | undefined) => void; responseInfo?: (info: ResponseInfo) => void; stream?: Writable; streamCreated?: boolean; trackRedirects?: boolean; } export declare function safeLstat(path: string, opts?: StatOptions & { bigint?: false; }): Promise; export declare function request(urlOrOptions: string | ExtendedRequestOptions, optionsOrEncoding?: ExtendedRequestOptions | string, anEncoding?: string): Promise; export {}; //# sourceMappingURL=by-request.d.ts.map