Module cdp::network
[−]
[src]
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.
Network
Commands
-
Enables network tracking, network events will now be delivered to the client.
-
Disables network tracking, prevents network events from being sent to the client.
-
Allows overriding user agent with the given string.
-
Specifies whether to always send extra HTTP headers with the requests from this page.
-
Returns content served for the given request.
Network.setBlockedURLsExperimentalBlocks URLs from loading.
Network.replayXHRExperimentalThis 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.
-
Tells whether clearing browser cache is supported.
-
Clears browser cache.
Network.canClearBrowserCookiesTells whether clearing browser cookies is supported.
-
Clears browser cookies.
Network.getCookiesExperimentalReturns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the
cookiesfield.Network.getAllCookiesExperimentalReturns all browser cookies. Depending on the backend support, will return detailed cookie information in the
cookiesfield.Network.deleteCookiesExperimentalDeletes browser cookies with matching name and url or domain/path pair.
Network.setCookieExperimentalSets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Network.setCookiesExperimentalSets given cookies.
Network.canEmulateNetworkConditionsExperimentalTells whether emulation of network conditions is supported.
Network.emulateNetworkConditionsActivates emulation of network conditions.
-
Toggles ignoring cache for each request. If
true, cache will not be used. Network.setBypassServiceWorkerExperimentalToggles ignoring of service worker for each request.
Network.setDataSizeLimitsForTestExperimentalFor testing.
Network.getCertificateExperimentalReturns the DER-encoded certificate.
Network.setRequestInterceptionEnabledExperimentalSets the requests to intercept that match a the provided patterns.
Network.continueInterceptedRequestExperimentalResponse 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.
Events
Network.resourceChangedPriorityExperimentalFired when resource loading priority is changed
-
Fired when page is about to send HTTP request.
Network.requestServedFromCacheFired if request ended up loading from cache.
-
Fired when HTTP response is available.
-
Fired when data chunk was received over the network.
-
Fired when HTTP request has finished loading.
-
Fired when HTTP request has failed to load.
Network.webSocketWillSendHandshakeRequestExperimentalFired when WebSocket is about to initiate handshake.
Network.webSocketHandshakeResponseReceivedExperimentalFired when WebSocket handshake response becomes available.
Network.webSocketCreatedExperimentalFired upon WebSocket creation.
Network.webSocketClosedExperimentalFired when WebSocket is closed.
Network.webSocketFrameReceivedExperimentalFired when WebSocket frame is received.
Network.webSocketFrameErrorExperimentalFired when WebSocket frame error occurs.
Network.webSocketFrameSentExperimentalFired when WebSocket frame is sent.
Network.eventSourceMessageReceivedExperimentalFired when EventSource message is received.
Network.requestInterceptedExperimentalDetails of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.
Types
-
Unique loader identifier.
-
Unique request identifier.
-
Unique intercepted request identifier.
-
Network level fetch failure reason.
-
UTC time in seconds, counted from January 1, 1970.
-
Monotonically increasing time in seconds since an arbitrary point in the past.
-
Request / response headers as keys / values of JSON object.
-
Loading priority of a resource request.
-
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
-
Timing information for the request.
-
Loading priority of a resource request.
-
HTTP request data.
-
Details of a signed certificate timestamp (SCT).
-
Security details about a request.
BlockedReasonExperimentalThe reason why request was blocked.
-
HTTP response data.
WebSocketRequestExperimentalWebSocket request data.
WebSocketResponseExperimentalWebSocket response data.
WebSocketFrameExperimentalWebSocket frame data.
-
Information about the cached resource.
-
Information about the request initiator.
CookieExperimentalCookie object
CookieParamExperimentalCookie parameter object
AuthChallengeExperimentalAuthorization challenge for HTTP status code 401 or 407.
AuthChallengeResponseExperimentalResponse to an AuthChallenge.
Structs
| AuthChallenge |
[Experimental] Authorization challenge for HTTP status code 401 or 407. |
| AuthChallengeResponse |
[Experimental] Response to an AuthChallenge. |
| CachedResource |
Information about the cached resource. |
| CanClearBrowserCacheCommand |
Tells whether clearing browser cache is supported. |
| CanClearBrowserCacheResponse |
Tells whether clearing browser cache is supported. |
| CanClearBrowserCookiesCommand |
Tells whether clearing browser cookies is supported. |
| CanClearBrowserCookiesResponse |
Tells whether clearing browser cookies is supported. |
| CanEmulateNetworkConditionsCommand |
[Experimental] Tells whether emulation of network conditions is supported. |
| CanEmulateNetworkConditionsResponse |
[Experimental] Tells whether emulation of network conditions is supported. |
| ClearBrowserCacheCommand |
Clears browser cache. |
| ClearBrowserCacheResponse |
Clears browser cache. |
| ClearBrowserCookiesCommand |
Clears browser cookies. |
| ClearBrowserCookiesResponse |
Clears browser cookies. |
| ContinueInterceptedRequestCommand |
[Experimental] 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. |
| ContinueInterceptedRequestResponse |
[Experimental] 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. |
| Cookie |
[Experimental] Cookie object |
| CookieParam |
[Experimental] Cookie parameter object |
| DataReceivedEvent |
Fired when data chunk was received over the network. |
| DeleteCookiesCommand |
[Experimental] Deletes browser cookies with matching name and url or domain/path pair. |
| DeleteCookiesResponse |
[Experimental] Deletes browser cookies with matching name and url or domain/path pair. |
| DisableCommand |
Disables network tracking, prevents network events from being sent to the client. |
| DisableResponse |
Disables network tracking, prevents network events from being sent to the client. |
| EmulateNetworkConditionsCommand |
Activates emulation of network conditions. |
| EmulateNetworkConditionsResponse |
Activates emulation of network conditions. |
| EnableCommand |
Enables network tracking, network events will now be delivered to the client. |
| EnableResponse |
Enables network tracking, network events will now be delivered to the client. |
| EventSourceMessageReceivedEvent |
[Experimental] Fired when EventSource message is received. |
| GetAllCookiesCommand |
[Experimental] Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the |
| GetAllCookiesResponse |
[Experimental] Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the |
| GetCertificateCommand |
[Experimental] Returns the DER-encoded certificate. |
| GetCertificateResponse |
[Experimental] Returns the DER-encoded certificate. |
| GetCookiesCommand |
[Experimental] Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the |
| GetCookiesResponse |
[Experimental] Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the |
| GetResponseBodyCommand |
Returns content served for the given request. |
| GetResponseBodyResponse |
Returns content served for the given request. |
| Initiator |
Information about the request initiator. |
| LoadingFailedEvent |
Fired when HTTP request has failed to load. |
| LoadingFinishedEvent |
Fired when HTTP request has finished loading. |
| ReplayXhrCommand |
[Experimental] 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. |
| ReplayXhrResponse |
[Experimental] 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. |
| Request |
HTTP request data. |
| RequestInterceptedEvent |
[Experimental] Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. |
| RequestServedFromCacheEvent |
Fired if request ended up loading from cache. |
| RequestWillBeSentEvent |
Fired when page is about to send HTTP request. |
| ResourceChangedPriorityEvent |
[Experimental] Fired when resource loading priority is changed |
| ResourceTiming |
Timing information for the request. |
| Response |
HTTP response data. |
| ResponseReceivedEvent |
Fired when HTTP response is available. |
| SecurityDetails |
Security details about a request. |
| SetBlockedUrLsCommand |
[Experimental] Blocks URLs from loading. |
| SetBlockedUrLsResponse |
[Experimental] Blocks URLs from loading. |
| SetBypassServiceWorkerCommand |
[Experimental] Toggles ignoring of service worker for each request. |
| SetBypassServiceWorkerResponse |
[Experimental] Toggles ignoring of service worker for each request. |
| SetCacheDisabledCommand |
Toggles ignoring cache for each request. If |
| SetCacheDisabledResponse |
Toggles ignoring cache for each request. If |
| SetCookieCommand |
[Experimental] Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. |
| SetCookieResponse |
[Experimental] Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. |
| SetCookiesCommand |
[Experimental] Sets given cookies. |
| SetCookiesResponse |
[Experimental] Sets given cookies. |
| SetDataSizeLimitsForTestCommand |
[Experimental] For testing. |
| SetDataSizeLimitsForTestResponse |
[Experimental] For testing. |
| SetExtraHttpHeadersCommand |
Specifies whether to always send extra HTTP headers with the requests from this page. |
| SetExtraHttpHeadersResponse |
Specifies whether to always send extra HTTP headers with the requests from this page. |
| SetRequestInterceptionEnabledCommand |
[Experimental] Sets the requests to intercept that match a the provided patterns. |
| SetRequestInterceptionEnabledResponse |
[Experimental] Sets the requests to intercept that match a the provided patterns. |
| SetUserAgentOverrideCommand |
Allows overriding user agent with the given string. |
| SetUserAgentOverrideResponse |
Allows overriding user agent with the given string. |
| SignedCertificateTimestamp |
Details of a signed certificate timestamp (SCT). |
| WebSocketClosedEvent |
[Experimental] Fired when WebSocket is closed. |
| WebSocketCreatedEvent |
[Experimental] Fired upon WebSocket creation. |
| WebSocketFrame |
[Experimental] WebSocket frame data. |
| WebSocketFrameErrorEvent |
[Experimental] Fired when WebSocket frame error occurs. |
| WebSocketFrameReceivedEvent |
[Experimental] Fired when WebSocket frame is received. |
| WebSocketFrameSentEvent |
[Experimental] Fired when WebSocket frame is sent. |
| WebSocketHandshakeResponseReceivedEvent |
[Experimental] Fired when WebSocket handshake response becomes available. |
| WebSocketRequest |
[Experimental] WebSocket request data. |
| WebSocketResponse |
[Experimental] WebSocket response data. |
| WebSocketWillSendHandshakeRequestEvent |
[Experimental] Fired when WebSocket is about to initiate handshake. |
Enums
| AuthChallengeResponseResponse |
[Experimental] |
| AuthChallengeSource |
[Experimental] |
| BlockedReason |
[Experimental] The reason why request was blocked. |
| ConnectionType |
Loading priority of a resource request. |
| CookieSameSite |
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies |
| ErrorReason |
Network level fetch failure reason. |
| InitiatorType |
Used in the type of |
| RequestReferrerPolicy |
Used in the type of |
| ResourcePriority |
Loading priority of a resource request. |
Type Definitions
| Headers |
Request / response headers as keys / values of JSON object. |
| InterceptionId |
Unique intercepted request identifier. |
| LoaderId |
Unique loader identifier. |
| MonotonicTime |
Monotonically increasing time in seconds since an arbitrary point in the past. |
| RequestId |
Unique request identifier. |
| TimeSinceEpoch |
UTC time in seconds, counted from January 1, 1970. |