Skip to main content

Module network

Module network 

Source
Expand description

Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.

Types, command parameters and event payloads for the Network domain. The method-name constants for the same domain are in crate::methods.

Structs§

AdAncestry
Encapsulates the script ancestry and the root script filter list rule that caused the resource or element to be labeled as an ad.
AdProvenance
Represents the provenance of an ad resource or element. Only one of filterlistRule or adScriptAncestry can be set. If filterlistRule is provided, the resource URL directly matches a filter list rule. If adScriptAncestry is provided, an ad script initiated the resource fetch or appended the element to the DOM. If neither is provided, the entity is known to be an ad, but provenance tracking information is unavailable.
AdScriptIdentifier
Identifies the script on the stack that caused a resource or element to be labeled as an ad. For resources, this indicates the context that triggered the fetch. For elements, this indicates the context that caused the element to be appended to the DOM.
AssociatedCookie
A cookie associated with the request which may or may not be sent with it. Includes the cookies itself and reasons for blocking or exemption.
AuthChallenge
Authorization challenge for HTTP status code 401 or 407.
AuthChallengeResponse
Response to an AuthChallenge.
BlockPattern
Experimental: may change without notice.
BlockedSetCookieWithReason
A cookie which was not stored from a response with the corresponding reason.
CachedResource
Information about the cached resource.
CanClearBrowserCacheParams
Tells whether clearing browser cache is supported.
CanClearBrowserCacheReturns
What Network.canClearBrowserCache answers with.
CanClearBrowserCookiesParams
Tells whether clearing browser cookies is supported.
CanClearBrowserCookiesReturns
What Network.canClearBrowserCookies answers with.
CanEmulateNetworkConditionsParams
Tells whether emulation of network conditions is supported.
CanEmulateNetworkConditionsReturns
What Network.canEmulateNetworkConditions answers with.
ChallengeEventDetails
Session event details specific to challenges.
ClearBrowserCacheParams
Clears browser cache.
ClearBrowserCookiesParams
Clears browser cookies.
ClientSecurityState
Experimental: may change without notice.
ConfigureDurableMessagesParams
Configures storing response bodies outside of renderer, so that these survive a cross-process navigation. If maxTotalBufferSize is not set, durable messages are disabled.
ConnectTiming
Experimental: may change without notice.
ContentSecurityPolicyStatus
Experimental: may change without notice.
Cookie
Cookie object
CookieParam
Cookie parameter object
CookiePartitionKey
cookiePartitionKey object The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
CorsErrorStatus
CreationEventDetails
Session event details specific to creation.
CrossOriginEmbedderPolicyStatus
Experimental: may change without notice.
CrossOriginOpenerPolicyStatus
Experimental: may change without notice.
DataReceivedEvent
Fired when data chunk was received over the network.
DeleteCookiesParams
Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
DeleteDeviceBoundSessionParams
Deletes a device bound session.
DeviceBoundSession
A device bound session.
DeviceBoundSessionCookieCraving
A device bound session’s cookie craving.
DeviceBoundSessionEventOccurredEvent
Triggered when a device bound session event occurs.
DeviceBoundSessionFailedRequest
Details about a failed device bound session network request.
DeviceBoundSessionInclusionRules
A device bound session’s inclusion rules.
DeviceBoundSessionKey
Unique identifier for a device bound session.
DeviceBoundSessionUrlRule
A device bound session’s inclusion URL rule.
DeviceBoundSessionWithUsage
How a device bound session was used during a request.
DeviceBoundSessionsAddedEvent
Triggered when the initial set of device bound sessions is added.
DirectTcpSocketAbortedEvent
Fired when direct_socket.TCPSocket is aborted.
DirectTcpSocketChunkReceivedEvent
Fired when data is received from tcp direct socket stream.
DirectTcpSocketChunkSentEvent
Fired when data is sent to tcp direct socket stream.
DirectTcpSocketClosedEvent
Fired when direct_socket.TCPSocket is closed.
DirectTcpSocketCreatedEvent
Fired upon direct_socket.TCPSocket creation.
DirectTcpSocketOpenedEvent
Fired when direct_socket.TCPSocket connection is opened.
DirectTcpSocketOptions
Experimental: may change without notice.
DirectUdpMessage
Experimental: may change without notice.
DirectUdpSocketAbortedEvent
Fired when direct_socket.UDPSocket is aborted.
DirectUdpSocketChunkReceivedEvent
Fired when message is received from udp direct socket stream.
DirectUdpSocketChunkSentEvent
Fired when message is sent to udp direct socket stream.
DirectUdpSocketClosedEvent
Fired when direct_socket.UDPSocket is closed.
DirectUdpSocketCreatedEvent
Fired upon direct_socket.UDPSocket creation.
DirectUdpSocketJoinedMulticastGroupEvent
Experimental: may change without notice.
DirectUdpSocketLeftMulticastGroupEvent
Experimental: may change without notice.
DirectUdpSocketOpenedEvent
Fired when direct_socket.UDPSocket connection is opened.
DirectUdpSocketOptions
Experimental: may change without notice.
DisableParams
Disables network tracking, prevents network events from being sent to the client.
EmulateNetworkConditionsByRuleParams
Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated Network.emulateNetworkConditions this method does not affect navigator state. Use Network.overrideNetworkState to explicitly modify navigator behavior.
EmulateNetworkConditionsByRuleReturns
What Network.emulateNetworkConditionsByRule answers with.
EmulateNetworkConditionsParams
Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.
EnableDeviceBoundSessionsParams
Sets up tracking device bound sessions and fetching of initial set of sessions.
EnableParams
Enables network tracking, network events will now be delivered to the client.
EnableReportingApiParams
Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers ‘reportingApiReportAdded’ for all existing reports.
EventSourceMessageReceivedEvent
Fired when EventSource message is received.
ExemptedSetCookieWithReason
A cookie should have been blocked by 3PCD but is exempted and stored from a response with the corresponding reason. A cookie could only have at most one exemption reason.
FetchSchemefulSiteParams
Fetches the schemeful site for a specific origin.
FetchSchemefulSiteReturns
What Network.fetchSchemefulSite answers with.
GetAllCookiesParams
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field. Deprecated. Use Storage.getCookies instead.
GetAllCookiesReturns
What Network.getAllCookies answers with.
GetCertificateParams
Returns the DER-encoded certificate.
GetCertificateReturns
What Network.getCertificate answers with.
GetCookiesParams
Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.
GetCookiesReturns
What Network.getCookies answers with.
GetRequestPostDataParams
Returns post data sent with the request. Returns an error when no data was sent with the request.
GetRequestPostDataReturns
What Network.getRequestPostData answers with.
GetResponseBodyParams
Returns content served for the given request.
GetResponseBodyReturns
What Network.getResponseBody answers with.
GetSecurityIsolationStatusParams
Returns information about the COEP/COOP isolation status.
GetSecurityIsolationStatusReturns
What Network.getSecurityIsolationStatus answers with.
Initiator
Information about the request initiator.
LoadNetworkResourceOptions
An options object that may be extended later to better support CORS, CORB and streaming.
LoadNetworkResourcePageResult
An object providing the result of a network resource load.
LoadNetworkResourceParams
Fetches the resource and returns the content.
LoadNetworkResourceReturns
What Network.loadNetworkResource answers with.
LoadingFailedEvent
Fired when HTTP request has failed to load.
LoadingFinishedEvent
Fired when HTTP request has finished loading.
NetworkConditions
Experimental: may change without notice.
OverrideNetworkStateParams
Override the state of navigator.onLine and navigator.connection.
PolicyUpdatedEvent
Fired once security policy has been updated.
PostDataEntry
Post data entry for HTTP request
RefreshEventDetails
Session event details specific to refresh.
ReplayXhrParams
This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.
ReportingApiEndpoint
Experimental: may change without notice.
ReportingApiEndpointsChangedForOriginEvent
Experimental: may change without notice.
ReportingApiReport
An object representing a report generated by the Reporting API.
ReportingApiReportAddedEvent
Is sent whenever a new report is added. And after ‘enableReportingApi’ for all existing reports.
ReportingApiReportUpdatedEvent
Experimental: may change without notice.
Request
HTTP request data.
RequestServedFromCacheEvent
Fired if request ended up loading from cache.
RequestWillBeSentEvent
Fired when page is about to send HTTP request.
RequestWillBeSentExtraInfoEvent
Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.
ResourceChangedPriorityEvent
Fired when resource loading priority is changed
ResourceTiming
Timing information for the request.
Response
HTTP response data.
ResponseReceivedEarlyHintsEvent
Fired when 103 Early Hints headers is received in addition to the common response. Not every responseReceived event will have an responseReceivedEarlyHints fired. Only one responseReceivedEarlyHints may be fired for eached responseReceived event.
ResponseReceivedEvent
Fired when HTTP response is available.
ResponseReceivedExtraInfoEvent
Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.
SearchInResponseBodyParams
Searches for given string in response content.
SearchInResponseBodyReturns
What Network.searchInResponseBody answers with.
SecurityDetails
Security details about a request.
SecurityIsolationStatus
Experimental: may change without notice.
ServiceWorkerRouterInfo
Experimental: may change without notice.
SetAttachDebugStackParams
Specifies whether to attach a page script stack id in requests
SetBlockedUrLsParams
Blocks URLs from loading.
SetBypassServiceWorkerParams
Toggles ignoring of service worker for each request.
SetCacheDisabledParams
Toggles ignoring cache for each request. If true, cache will not be used.
SetCookieControlsParams
Sets Controls for third-party cookie access Page reload is required before the new cookie behavior will be observed
SetCookieParams
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
SetCookieReturns
What Network.setCookie answers with.
SetCookiesParams
Sets given cookies.
SetExtraHttpHeadersParams
Specifies whether to always send extra HTTP headers with the requests from this page.
SetUserAgentOverrideParams
Allows overriding user agent with the given string.
SignedCertificateTimestamp
Details of a signed certificate timestamp (SCT).
SignedExchangeError
Information about a signed exchange response.
SignedExchangeHeader
Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
SignedExchangeInfo
Information about a signed exchange response.
SignedExchangeReceivedEvent
Fired when a signed exchange was received over the network
SignedExchangeSignature
Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
StreamResourceContentParams
Enables streaming of the response for the given requestId. If enabled, the dataReceived event contains the data that was received during streaming.
StreamResourceContentReturns
What Network.streamResourceContent answers with.
TerminationEventDetails
Session event details specific to termination.
TrustTokenOperationDoneEvent
Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.
TrustTokenParams
Determines what type of Trust Token operation is executed and depending on the type, some additional parameters. The values are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
WebSocketClosedEvent
Fired when WebSocket is closed.
WebSocketCreatedEvent
Fired upon WebSocket creation.
WebSocketFrame
WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
WebSocketFrameErrorEvent
Fired when WebSocket message error occurs.
WebSocketFrameReceivedEvent
Fired when WebSocket message is received.
WebSocketFrameSentEvent
Fired when WebSocket message is sent.
WebSocketHandshakeResponseReceivedEvent
Fired when WebSocket handshake response becomes available.
WebSocketRequest
WebSocket request data.
WebSocketResponse
WebSocket response data.
WebSocketWillSendHandshakeRequestEvent
Fired when WebSocket is about to initiate handshake.
WebTransportClosedEvent
Fired when WebTransport is disposed.
WebTransportConnectionEstablishedEvent
Fired when WebTransport handshake is finished.
WebTransportCreatedEvent
Fired upon WebTransport creation.

Enums§

AlternateProtocolUsage
The reason why Chrome uses a specific transport protocol for HTTP semantics.
AuthChallengeResponseResponse
The values response accepts on AuthChallengeResponse.
AuthChallengeSource
The values source accepts on AuthChallenge.
BlockedReason
The reason why request was blocked.
CertificateTransparencyCompliance
Whether the request complied with Certificate Transparency policy.
ChallengeEventDetailsChallengeResult
The values challengeResult accepts on ChallengeEventDetails.
ConnectionType
The underlying connection technology that the browser is supposedly using.
ContentSecurityPolicySource
Experimental: may change without notice.
CookieBlockedReason
Types of reasons why a cookie may not be sent with a request.
CookieExemptionReason
Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
CookiePriority
Represents the cookie’s ‘Priority’ status: https://tools.ietf.org/html/draft-west-cookie-priority-00
CookieSameSite
Represents the cookie’s ‘SameSite’ status: https://tools.ietf.org/html/draft-west-first-party-cookies
CookieSourceScheme
Represents the source scheme of the origin that originally set the cookie. A value of “Unset” allows protocol clients to emulate legacy cookie scope for the scheme. This is a temporary ability and it will be removed in the future.
CorsError
The reason why request was blocked.
CrossOriginEmbedderPolicyValue
Experimental: may change without notice.
CrossOriginOpenerPolicyValue
Experimental: may change without notice.
DeviceBoundSessionFetchResult
A fetch result for a device bound session creation or refresh. LINT.IfChange(DeviceBoundSessionFetchResult)
DeviceBoundSessionUrlRuleRuleType
The values ruleType accepts on DeviceBoundSessionUrlRule.
DeviceBoundSessionWithUsageUsage
The values usage accepts on DeviceBoundSessionWithUsage.
DirectSocketDnsQueryType
Experimental: may change without notice.
ErrorReason
Network level fetch failure reason.
InitiatorType
The values type accepts on Initiator.
IpAddressSpace
Experimental: may change without notice.
LocalNetworkAccessRequestPolicy
Experimental: may change without notice.
RefreshEventDetailsRefreshResult
The values refreshResult accepts on RefreshEventDetails.
RenderBlockingBehavior
The render-blocking behavior of a resource request.
ReportStatus
The status of a Reporting API report.
RequestReferrerPolicy
The values referrerPolicy accepts on Request.
ResourcePriority
Loading priority of a resource request.
ResourceType
Resource type as it was perceived by the rendering engine.
ServiceWorkerResponseSource
Source of serviceworker response.
ServiceWorkerRouterSource
Source of service worker router.
SetCookieBlockedReason
Types of reasons why a cookie may not be stored from a response.
SignedExchangeErrorField
Field type for a signed exchange related error.
TerminationEventDetailsDeletionReason
The values deletionReason accepts on TerminationEventDetails.
TrustTokenOperationDoneStatus
The values status accepts on trustTokenOperationDone.
TrustTokenOperationType
Experimental: may change without notice.
TrustTokenParamsRefreshPolicy
The values refreshPolicy accepts on TrustTokenParams.

Type Aliases§

DeviceBoundSessionEventId
A unique identifier for a device bound session event.
Headers
Request / response headers as keys / values of JSON object.
LoaderId
Unique loader identifier.
MonotonicTime
Monotonically increasing time in seconds since an arbitrary point in the past.
ReportId
Experimental: may change without notice.
RequestId
Unique network request identifier. Note that this does not identify individual HTTP requests that are part of a network request.
TimeSinceEpoch
UTC time in seconds, counted from January 1, 1970.