Click or drag to resize

NetworkClient Class

Version 93.1.111
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.
Inheritance Hierarchy

Namespace:  CefSharp.DevTools.Network
Assembly:  CefSharp (in CefSharp.dll) Version: 93.1.111.0 (93.1.111.0)
Syntax
public class NetworkClient : DevToolsDomainBase

The NetworkClient type exposes the following members.

Constructors
  NameDescription
Public methodNetworkClient
Network
Top
Methods
  NameDescription
Public methodClearAcceptedEncodingsOverrideAsync
Clears accepted encodings set by setAcceptedEncodings
Public methodClearBrowserCacheAsync
Clears browser cache.
Public methodClearBrowserCookiesAsync
Clears browser cookies.
Public methodDeleteCookiesAsync
Deletes browser cookies with matching name and url or domain/path pair.
Public methodDisableAsync
Disables network tracking, prevents network events from being sent to the client.
Public methodEmulateNetworkConditionsAsync
Activates emulation of network conditions.
Public methodEnableAsync
Enables network tracking, network events will now be delivered to the client.
Protected methodEnumToString(Enum) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(ContentEncoding) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(CSPViolationType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(DisabledImageType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(PermissionType) (Inherited from DevToolsDomainBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAllCookiesAsync
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field.
Public methodGetCertificateAsync
Returns the DER-encoded certificate.
Public methodGetCookiesAsync
Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRequestPostDataAsync
Returns post data sent with the request. Returns an error when no data was sent with the request.
Public methodGetResponseBodyAsync
Returns content served for the given request.
Public methodGetResponseBodyForInterceptionAsync
Returns content served for the given currently intercepted request.
Public methodGetSecurityIsolationStatusAsync
Returns information about the COEP/COOP isolation status.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLoadNetworkResourceAsync
Fetches the resource and returns the content.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReplayXHRAsync
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.
Public methodSearchInResponseBodyAsync
Searches for given string in response content.
Public methodSetAcceptedEncodingsAsync
Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
Public methodSetAttachDebugStackAsync
Specifies whether to attach a page script stack id in requests
Public methodSetBlockedURLsAsync
Blocks URLs from loading.
Public methodSetBypassServiceWorkerAsync
Toggles ignoring of service worker for each request.
Public methodSetCacheDisabledAsync
Toggles ignoring cache for each request. If `true`, cache will not be used.
Public methodSetCookieAsync
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Public methodSetCookiesAsync
Sets given cookies.
Public methodSetExtraHTTPHeadersAsync
Specifies whether to always send extra HTTP headers with the requests from this page.
Public methodSetUserAgentOverrideAsync
Allows overriding user agent with the given string.
Public methodTakeResponseBodyForInterceptionAsStreamAsync
Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.
Protected methodToBase64String (Inherited from DevToolsDomainBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventDataReceived
Fired when data chunk was received over the network.
Public eventEventSourceMessageReceived
Fired when EventSource message is received.
Public eventLoadingFailed
Fired when HTTP request has failed to load.
Public eventLoadingFinished
Fired when HTTP request has finished loading.
Public eventRequestServedFromCache
Fired if request ended up loading from cache.
Public eventRequestWillBeSent
Fired when page is about to send HTTP request.
Public eventRequestWillBeSentExtraInfo
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.
Public eventResourceChangedPriority
Fired when resource loading priority is changed
Public eventResponseReceived
Fired when HTTP response is available.
Public eventResponseReceivedExtraInfo
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.
Public eventSignedExchangeReceived
Fired when a signed exchange was received over the network
Public eventSubresourceWebBundleInnerResponseError
Fired when request for resources within a .wbn file failed.
Public eventSubresourceWebBundleInnerResponseParsed
Fired when handling requests for resources within a .wbn file. Note: this will only be fired for resources that are requested by the webpage.
Public eventSubresourceWebBundleMetadataError
Fired once when parsing the .wbn file has failed.
Public eventSubresourceWebBundleMetadataReceived
Fired once when parsing the .wbn file has succeeded. The event contains the information about the web bundle contents.
Public eventTrustTokenOperationDone
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.
Public eventWebSocketClosed
Fired when WebSocket is closed.
Public eventWebSocketCreated
Fired upon WebSocket creation.
Public eventWebSocketFrameError
Fired when WebSocket message error occurs.
Public eventWebSocketFrameReceived
Fired when WebSocket message is received.
Public eventWebSocketFrameSent
Fired when WebSocket message is sent.
Public eventWebSocketHandshakeResponseReceived
Fired when WebSocket handshake response becomes available.
Public eventWebSocketWillSendHandshakeRequest
Fired when WebSocket is about to initiate handshake.
Public eventWebTransportClosed
Fired when WebTransport is disposed.
Public eventWebTransportConnectionEstablished
Fired when WebTransport handshake is finished.
Public eventWebTransportCreated
Fired upon WebTransport creation.
Top
See Also