Chrome Remote Interface v0.1.0 ChromeRemoteInterface.RPC.Network View Source

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.

Link to this section Summary

Functions

Tells whether clearing browser cache is supported

Tells whether clearing browser cookies is supported

Tells whether emulation of network conditions is supported

Clears browser cache

Clears browser cookies

Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId

Deletes browser cookies with matching name and url or domain/path pair

Disables network tracking, prevents network events from being sent to the client

Activates emulation of network conditions

Enables network tracking, network events will now be delivered to the client

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field

Returns the DER-encoded certificate

Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field

Returns content served for the given request

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

Blocks URLs from loading

Toggles ignoring of service worker for each request

Toggles ignoring cache for each request. If true, cache will not be used

Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist

Sets given cookies

Specifies whether to always send extra HTTP headers with the requests from this page

Sets the requests to intercept that match a the provided patterns

Allows overriding user agent with the given string

Link to this section Functions

Link to this function canClearBrowserCache(page_pid) View Source

Tells whether clearing browser cache is supported.

Parameters:

Link to this function canClearBrowserCache(page_pid, parameters) View Source
Link to this function canClearBrowserCache(page_pid, parameters, opts) View Source
Link to this function canClearBrowserCookies(page_pid) View Source

Tells whether clearing browser cookies is supported.

Parameters:

Link to this function canClearBrowserCookies(page_pid, parameters) View Source
Link to this function canClearBrowserCookies(page_pid, parameters, opts) View Source
Link to this function canEmulateNetworkConditions(page_pid) View Source

Tells whether emulation of network conditions is supported.

Parameters:

Link to this function canEmulateNetworkConditions(page_pid, parameters) View Source
Link to this function canEmulateNetworkConditions(page_pid, parameters, opts) View Source
Link to this function clearBrowserCache(page_pid) View Source

Clears browser cache.

Parameters:

Link to this function clearBrowserCache(page_pid, parameters) View Source
Link to this function clearBrowserCache(page_pid, parameters, opts) View Source
Link to this function clearBrowserCookies(page_pid) View Source

Clears browser cookies.

Parameters:

Link to this function clearBrowserCookies(page_pid, parameters) View Source
Link to this function clearBrowserCookies(page_pid, parameters, opts) View Source
Link to this function continueInterceptedRequest(page_pid) View Source

Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId.

Parameters: interceptionId - - errorReason - - If set this causes the request to fail with the given reason. Passing Aborted for requests marked with isNavigationRequest also cancels the navigation. Must not be set in response to an authChallenge.rawResponse - - If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc… Must not be set in response to an authChallenge.url - - If set the request url will be modified in a way that’s not observable by page. Must not be set in response to an authChallenge.method - - If set this allows the request method to be overridden. Must not be set in response to an authChallenge.postData - - If set this allows postData to be set. Must not be set in response to an authChallenge.headers - - If set this allows the request headers to be changed. Must not be set in response to an authChallenge.authChallengeResponse - - Response to a requestIntercepted with an authChallenge. Must not be set otherwise.

Link to this function continueInterceptedRequest(page_pid, parameters) View Source
Link to this function continueInterceptedRequest(page_pid, parameters, opts) View Source

Deletes browser cookies with matching name and url or domain/path pair.

Parameters: name - - Name of the cookies to remove.url - - If specified, deletes all the cookies with the given name where domain and path match provided URL.domain - - If specified, deletes only cookies with the exact domain.path - - If specified, deletes only cookies with the exact path.

Link to this function deleteCookies(page_pid, parameters) View Source
Link to this function deleteCookies(page_pid, parameters, opts) View Source

Disables network tracking, prevents network events from being sent to the client.

Parameters:

Link to this function disable(page_pid, parameters) View Source
Link to this function disable(page_pid, parameters, opts) View Source
Link to this function emulateNetworkConditions(page_pid) View Source

Activates emulation of network conditions.

Parameters: offline - - True to emulate internet disconnection.latency - - Minimum latency from request sent to response headers received (ms).downloadThroughput - - Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.uploadThroughput - - Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.connectionType - - Connection type if known.

Link to this function emulateNetworkConditions(page_pid, parameters) View Source
Link to this function emulateNetworkConditions(page_pid, parameters, opts) View Source

Enables network tracking, network events will now be delivered to the client.

Parameters: maxTotalBufferSize - - Buffer size in bytes to use when preserving network payloads (XHRs, etc).maxResourceBufferSize - - Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).

Link to this function enable(page_pid, parameters) View Source
Link to this function enable(page_pid, parameters, opts) View Source

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.

Parameters:

Link to this function getAllCookies(page_pid, parameters) View Source
Link to this function getAllCookies(page_pid, parameters, opts) View Source
Link to this function getCertificate(page_pid) View Source

Returns the DER-encoded certificate.

Parameters: origin - - Origin to get certificate for.

Link to this function getCertificate(page_pid, parameters) View Source
Link to this function getCertificate(page_pid, parameters, opts) View Source

Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.

Parameters: urls - - The list of URLs for which applicable cookies will be fetched

Link to this function getCookies(page_pid, parameters) View Source
Link to this function getCookies(page_pid, parameters, opts) View Source
Link to this function getResponseBody(page_pid) View Source

Returns content served for the given request.

Parameters: requestId - - Identifier of the network request to get content for.

Link to this function getResponseBody(page_pid, parameters) View Source
Link to this function getResponseBody(page_pid, parameters, opts) View Source

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.

Parameters: requestId - - Identifier of XHR to replay.

Link to this function replayXHR(page_pid, parameters) View Source
Link to this function replayXHR(page_pid, parameters, opts) View Source
Link to this function setBlockedURLs(page_pid) View Source

Blocks URLs from loading.

Parameters: urls - - URL patterns to block. Wildcards (‘*’) are allowed.

Link to this function setBlockedURLs(page_pid, parameters) View Source
Link to this function setBlockedURLs(page_pid, parameters, opts) View Source
Link to this function setBypassServiceWorker(page_pid) View Source

Toggles ignoring of service worker for each request.

Parameters: bypass - - Bypass service worker and load from network.

Link to this function setBypassServiceWorker(page_pid, parameters) View Source
Link to this function setBypassServiceWorker(page_pid, parameters, opts) View Source
Link to this function setCacheDisabled(page_pid) View Source

Toggles ignoring cache for each request. If true, cache will not be used.

Parameters: cacheDisabled - - Cache disabled state.

Link to this function setCacheDisabled(page_pid, parameters) View Source
Link to this function setCacheDisabled(page_pid, parameters, opts) View Source

Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.

Parameters: name - - Cookie name.value - - Cookie value.url - - The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.domain - - Cookie domain.path - - Cookie path.secure - - True if cookie is secure.httpOnly - - True if cookie is http-only.sameSite - - Cookie SameSite type.expires - - Cookie expiration date, session cookie if not set

Link to this function setCookie(page_pid, parameters) View Source
Link to this function setCookie(page_pid, parameters, opts) View Source

Sets given cookies.

Parameters: cookies - - Cookies to be set.

Link to this function setCookies(page_pid, parameters) View Source
Link to this function setCookies(page_pid, parameters, opts) View Source
Link to this function setDataSizeLimitsForTest(page_pid) View Source

For testing.

Parameters: maxTotalSize - - Maximum total buffer size.maxResourceSize - - Maximum per-resource size.

Link to this function setDataSizeLimitsForTest(page_pid, parameters) View Source
Link to this function setDataSizeLimitsForTest(page_pid, parameters, opts) View Source
Link to this function setExtraHTTPHeaders(page_pid) View Source

Specifies whether to always send extra HTTP headers with the requests from this page.

Parameters: headers - - Map with extra HTTP headers.

Link to this function setExtraHTTPHeaders(page_pid, parameters) View Source
Link to this function setExtraHTTPHeaders(page_pid, parameters, opts) View Source
Link to this function setRequestInterceptionEnabled(page_pid) View Source

Sets the requests to intercept that match a the provided patterns.

Parameters: enabled - - Whether requests should be intercepted. If patterns is not set, matches all and resets any previously set patterns. Other parameters are ignored if false.patterns - - URLs matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call. Wildcards (‘‘ -> zero or more, ‘?’ -> exactly one) are allowed. Escape character is backslash. If omitted equivalent to [‘’] (intercept all).

Link to this function setRequestInterceptionEnabled(page_pid, parameters) View Source
Link to this function setRequestInterceptionEnabled(page_pid, parameters, opts) View Source
Link to this function setUserAgentOverride(page_pid) View Source

Allows overriding user agent with the given string.

Parameters: userAgent - - User agent to use.

Link to this function setUserAgentOverride(page_pid, parameters) View Source
Link to this function setUserAgentOverride(page_pid, parameters, opts) View Source