import type { DispatcherOptions, RequestOptions } from "../request.js"; import type EventEmitter from "node:events"; import type * as UndiciT from "undici"; export interface ProxyEnvVar { name: string; value: string; } export declare const AUTO_SELECT_FAMILY_ATTEMPT_TIMEOUT_IN_MILLISECONDS = 1250; export declare function generateTempFilePath(filePath: string): Promise; export declare function getBaseRequestOptions(requestUrl: string, { extraHeaders, abortSignal, queryParams }?: RequestOptions, dispatcherOrDispatcherOptions?: UndiciT.Dispatcher | DispatcherOptions): Promise<{ query?: Record | undefined; signal?: EventEmitter | AbortSignal | undefined; dispatcher: UndiciT.Dispatcher; headers: Record; }>; export declare function getHeaders(requestUrl: string, extraHeaders?: Record): Record; export declare function getAuthHeader(requestUrl: string): string | undefined; /** * Determines whether a url points at the loopback interface. */ export declare function isLoopbackUrl(parsedUrl: URL): boolean; /** * Determines whether `NO_PROXY` (or `no_proxy`) excludes a url from being * proxied. A value of `*` excludes everything; the other entries are matched as * described in {@link parseNoProxy}. */ export declare function isExcludedByNoProxy(parsedUrl: URL): boolean; /** * Finds the environment variable that configures the proxy for a given url, * following the usual precedence: the variable matching the url's protocol * first, lowercase before uppercase, then the other protocol's as a fallback. * * Empty and whitespace-only values are treated as unset, as that's how users * disable a variable inherited from a parent environment. The returned value is * trimmed, but not validated. * * @param requestUrl The url the proxy would be used for. * @returns The variable's name and value, or `undefined` if none is set or the * url's protocol isn't proxyable. */ export declare function findProxyEnvVar(requestUrl: string): ProxyEnvVar | undefined; /** * Resolves the proxy to use for a given url from the environment. * * @param requestUrl The url the proxy would be used for. * @returns The proxy url, or `undefined` if the environment configures none, * `NO_PROXY` excludes the url, or the url can't be proxied. * @throws InvalidProxyUrlError If the configured proxy isn't a valid http(s) url. */ export declare function resolveProxyFromEnv(requestUrl: string): string | undefined; export declare function getProxyDispatcher(proxy: string, options: Omit): Promise; export declare function getPoolDispatcher(requestUrl: string, options: UndiciT.Pool.Options): Promise; export declare function getBasicDispatcher(options: UndiciT.Agent.Options): Promise; export declare function getBaseDispatcherOptions(timeout?: number, isTestDispatcher?: boolean): UndiciT.Client.Options; export declare function sanitizeUrl(requestUrl: string): string; export declare function handleError(e: Error, requestUrl: string): void; //# sourceMappingURL=request.d.ts.map