/**
 * @fileoverview `NetworkRequest` represents a single network request and keeps
 * track of all the related CDP events.
 */
import type Protocol from 'devtools-protocol';
import type { EventManager } from '../events/EventManager.js';
import { type Network } from '../../../protocol/protocol.js';
import type { CdpTarget } from '../context/CdpTarget.js';
/** Abstracts one individual network request. */
export declare class NetworkRequest {
    #private;
    /**
     * Each network request has an associated request id, which is a string
     * uniquely identifying that request.
     *
     * The identifier for a request resulting from a redirect matches that of the
     * request that initiated it.
     */
    readonly requestId: Network.Request;
    constructor(requestId: Network.Request, eventManager: EventManager, cdpTarget: CdpTarget, redirectCount?: number);
    get url(): string | undefined;
    get redirectCount(): number;
    get cdpTarget(): CdpTarget;
    isRedirecting(): boolean;
    handleRedirect(event: Protocol.Network.RequestWillBeSentEvent): void;
    onRequestWillBeSentEvent(event: Protocol.Network.RequestWillBeSentEvent): void;
    onRequestWillBeSentExtraInfoEvent(event: Protocol.Network.RequestWillBeSentExtraInfoEvent): void;
    onResponseReceivedExtraInfoEvent(event: Protocol.Network.ResponseReceivedExtraInfoEvent): void;
    onResponseReceivedEvent(event: Protocol.Network.ResponseReceivedEvent): void;
    onServedFromCache(): void;
    onLoadingFailedEvent(event: Protocol.Network.LoadingFailedEvent): void;
    /** Fired whenever a network request interception is hit. */
    onRequestPaused(_event: Protocol.Fetch.RequestPausedEvent): void;
    failRequest(fetchRequestId: Protocol.Fetch.RequestId, errorReason: Protocol.Network.ErrorReason): Promise<void>;
    dispose(): void;
}
