import type { AsyncDisposal } from "../disposal.js";
import type { Source } from "./source.js";
export interface UrlOptions {
    /** Sent with every request, but for Host, Range and Accept-Encoding, which the transport owns. */
    headers?: Readonly<Record<string, string>>;
    /**
     * The client every request goes through, for a host that needs HTTP/2, a proxy or a pinned certificate.
     *
     * It is handed the URL as the string given.
     */
    fetch?: typeof globalThis.fetch;
    /**
     * How long the source may deliver nothing before the read is refused.
     *
     * Unset, a socket that has gone quiet waits until the call's `signal` cuts it.
     */
    stallMs?: number | null;
}
export declare const TRANSPORT_OWNED_HEADERS: ReadonlySet<string>;
export declare const whyCredentialed: (parsed: URL) => string | null;
export declare const namesAuthority: (target: string) => boolean;
export declare function withoutHeaders(headers: Readonly<Record<string, string>>, names: ReadonlySet<string>): Record<string, string>;
/**
 * An HTTP source over `fetch`.
 *
 * A server that answers a Range request with anything but 206 fails the read as `source-failed`.
 */
export declare function urlSource(url: string, options?: UrlOptions): Promise<Source & AsyncDisposal>;
export declare function isHttpUrl(target: string): boolean;
export declare function admittedUrl(url: string): URL;
export declare function whyInadmissible(parsed: URL): string | null;
