/**
 * @fileoverview `NetworkRequest` represents a single network request and keeps
 * track of all the related CDP events.
 */
import type { Protocol } from 'devtools-protocol';
import { Network } from '../../../protocol/protocol.js';
import type { CdpTarget } from '../context/CdpTarget.js';
import type { EventManager } from '../session/EventManager.js';
import type { NetworkStorage } from './NetworkStorage.js';
/** Abstracts one individual network request. */
export declare class NetworkRequest {
    #private;
    constructor(id: Network.Request, eventManager: EventManager, networkStorage: NetworkStorage, cdpTarget: CdpTarget, redirectCount?: number);
    get id(): string;
    get fetchId(): string | undefined;
    get phase(): Network.InterceptPhase | undefined;
    get url(): string | undefined;
    get redirectCount(): number;
    get blocked(): boolean;
    get cdpClient(): import("../../BidiMapper.js").CdpClient;
    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;
    /** @see https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-failRequest */
    failRequest(errorReason: Protocol.Network.ErrorReason): Promise<void>;
    onRequestPaused(event: Protocol.Fetch.RequestPausedEvent): void;
    onAuthRequired(_event: Protocol.Fetch.AuthRequiredEvent): void;
    /** @see https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-continueRequest */
    continueRequest(url?: string, method?: string, headers?: Protocol.Fetch.HeaderEntry[]): Promise<void>;
    /** @see https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-continueResponse */
    continueResponse({ responseCode, responsePhrase, responseHeaders, }?: Omit<Protocol.Fetch.ContinueResponseRequest, 'requestId'>): Promise<void>;
    /** @see https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-continueWithAuth */
    continueWithAuth(authChallengeResponse?: Protocol.Fetch.ContinueWithAuthRequest['authChallengeResponse']): Promise<void>;
    /** @see https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-provideResponse */
    provideResponse({ responseCode, responsePhrase, responseHeaders, body, }: Omit<Protocol.Fetch.FulfillRequestRequest, 'requestId'>): Promise<void>;
    dispose(): void;
    /** Returns the HTTP status code associated with this request if any. */
    get statusCode(): number;
}
