Chrome Remote Interface v0.4.1 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

Clears browser cache.

Clears browser cookies.

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 all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.

Returns post data sent with the request. Returns an error when no data was sent with the request.

Returns content served for the given 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.

Allows overriding user agent with the given string.

Link to this section Functions

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

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).maxPostDataSize - - Longest post body size (in bytes) that would be included in requestWillBeSent notification

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

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

getRequestPostData(page_pid) View Source

Returns post data sent with the request. Returns an error when no data was sent with the request.

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

Link to this function

getRequestPostData(page_pid, parameters) View Source

Link to this function

getRequestPostData(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

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

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

setUserAgentOverride(page_pid) View Source

Allows overriding user agent with the given string.

Parameters: userAgent - - User agent to use.acceptLanguage - - Browser langugage to emulate.platform - - The platform navigator.platform should return.

Link to this function

setUserAgentOverride(page_pid, parameters) View Source

Link to this function

setUserAgentOverride(page_pid, parameters, opts) View Source