Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class NetworkManager
extends EventEmitter
import { NetworkManager } from "https://deno.land/x/pptr@1.2.0/src/NetworkManager.ts";

Constructors

new
NetworkManager(
client: CDPSession,
ignoreHTTPSErrors: boolean,
frameManager: FrameManager,
)

Properties

_attemptedAuthentications: Set<string>
_client: CDPSession
optional
_credentials: Credentials
_extraHTTPHeaders: Record<string, string>
_frameManager: FrameManager
_ignoreHTTPSErrors: boolean
_offline: boolean
_protocolRequestInterceptionEnabled: boolean
_requestIdToInterceptionId: Map<string, string>
_requestIdToRequest: Map<string, HTTPRequest>
_requestIdToRequestWillBeSentEvent: Map<string, Protocol.Network.RequestWillBeSentEvent>
_userCacheDisabled: boolean
_userRequestInterceptionEnabled: boolean

Methods

_handleRequestRedirect(request: HTTPRequest, responsePayload: Protocol.Network.Response): void
_onAuthRequired(event: Protocol.Fetch.AuthRequiredEvent): void
_onLoadingFailed(event: Protocol.Network.LoadingFailedEvent): void
_onLoadingFinished(event: Protocol.Network.LoadingFinishedEvent): void
_onRequest(event: Protocol.Network.RequestWillBeSentEvent, interceptionId?: string): void
_onRequestPaused(event: Protocol.Fetch.RequestPausedEvent): void
_onRequestServedFromCache(event: Protocol.Network.RequestServedFromCacheEvent): void
_onRequestWillBeSent(event: Protocol.Network.RequestWillBeSentEvent): void
_onResponseReceived(event: Protocol.Network.ResponseReceivedEvent): void
authenticate(credentials?: Credentials): Promise<void>
extraHTTPHeaders(): Record<string, string>
initialize(): Promise<void>
setCacheEnabled(enabled: boolean): Promise<void>
setExtraHTTPHeaders(extraHTTPHeaders: Record<string, string>): Promise<void>
setOfflineMode(value: boolean): Promise<void>
setRequestInterception(value: boolean): Promise<void>
setUserAgent(userAgent: string): Promise<void>