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.

Method names for the Network domain, for use with CdpClient::call.

Constants§

CAN_CLEAR_BROWSER_CACHE
Tells whether clearing browser cache is supported.
CAN_CLEAR_BROWSER_COOKIES
Tells whether clearing browser cookies is supported.
CAN_EMULATE_NETWORK_CONDITIONS
Tells whether emulation of network conditions is supported.
CLEAR_ACCEPTED_ENCODINGS_OVERRIDE
Clears accepted encodings set by setAcceptedEncodings
CLEAR_BROWSER_CACHE
Clears browser cache.
CLEAR_BROWSER_COOKIES
Clears browser cookies.
CONFIGURE_DURABLE_MESSAGES
Configures storing response bodies outside of renderer, so that these survive a cross-process navigation. If maxTotalBufferSize is not set, durable messages are disabled.
DELETE_COOKIES
Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
DELETE_DEVICE_BOUND_SESSION
Deletes a device bound session.
DISABLE
Disables network tracking, prevents network events from being sent to the client.
EMULATE_NETWORK_CONDITIONS
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.
EMULATE_NETWORK_CONDITIONS_BY_RULE
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.
ENABLE
Enables network tracking, network events will now be delivered to the client.
ENABLE_DEVICE_BOUND_SESSIONS
Sets up tracking device bound sessions and fetching of initial set of sessions.
ENABLE_REPORTING_API
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.
FETCH_SCHEMEFUL_SITE
Fetches the schemeful site for a specific origin.
GET_ALL_COOKIES
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field. Deprecated. Use Storage.getCookies instead.
GET_CERTIFICATE
Returns the DER-encoded certificate.
GET_COOKIES
Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.
GET_REQUEST_POST_DATA
Returns post data sent with the request. Returns an error when no data was sent with the request.
GET_RESPONSE_BODY
Returns content served for the given request.
GET_SECURITY_ISOLATION_STATUS
Returns information about the COEP/COOP isolation status.
LOAD_NETWORK_RESOURCE
Fetches the resource and returns the content.
OVERRIDE_NETWORK_STATE
Override the state of navigator.onLine and navigator.connection.
REPLAY_XHR
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.
SEARCH_IN_RESPONSE_BODY
Searches for given string in response content.
SET_ACCEPTED_ENCODINGS
Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
SET_ATTACH_DEBUG_STACK
Specifies whether to attach a page script stack id in requests
SET_BLOCKED_UR_LS
Blocks URLs from loading.
SET_BYPASS_SERVICE_WORKER
Toggles ignoring of service worker for each request.
SET_CACHE_DISABLED
Toggles ignoring cache for each request. If true, cache will not be used.
SET_COOKIE
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
SET_COOKIES
Sets given cookies.
SET_COOKIE_CONTROLS
Sets Controls for third-party cookie access Page reload is required before the new cookie behavior will be observed
SET_EXTRA_HTTP_HEADERS
Specifies whether to always send extra HTTP headers with the requests from this page.
SET_USER_AGENT_OVERRIDE
Allows overriding user agent with the given string.
STREAM_RESOURCE_CONTENT
Enables streaming of the response for the given requestId. If enabled, the dataReceived event contains the data that was received during streaming.