Class NetworkAdapter
Represents an adapter for the Network domain to simplify the command interface.
public class NetworkAdapter
- Inheritance
-
NetworkAdapter
- Inherited Members
Constructors
NetworkAdapter(IDevToolsSession)
Initializes a new instance of the NetworkAdapter class.
public NetworkAdapter(IDevToolsSession session)
Parameters
session
IDevToolsSessionThe IDevToolsSession to be used with this adapter.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
CanClearBrowserCache(CanClearBrowserCacheCommandSettings, CancellationToken, int?, bool)
canClearBrowserCache
public Task<CanClearBrowserCacheCommandResponse> CanClearBrowserCache(CanClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CanClearBrowserCacheCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CanClearBrowserCookies(CanClearBrowserCookiesCommandSettings, CancellationToken, int?, bool)
canClearBrowserCookies
public Task<CanClearBrowserCookiesCommandResponse> CanClearBrowserCookies(CanClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CanClearBrowserCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CanEmulateNetworkConditions(CanEmulateNetworkConditionsCommandSettings, CancellationToken, int?, bool)
canEmulateNetworkConditions
public Task<CanEmulateNetworkConditionsCommandResponse> CanEmulateNetworkConditions(CanEmulateNetworkConditionsCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CanEmulateNetworkConditionsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearBrowserCache(ClearBrowserCacheCommandSettings, CancellationToken, int?, bool)
clearBrowserCache
public Task<ClearBrowserCacheCommandResponse> ClearBrowserCache(ClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearBrowserCacheCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearBrowserCookies(ClearBrowserCookiesCommandSettings, CancellationToken, int?, bool)
clearBrowserCookies
public Task<ClearBrowserCookiesCommandResponse> ClearBrowserCookies(ClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearBrowserCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ContinueInterceptedRequest(ContinueInterceptedRequestCommandSettings, CancellationToken, int?, bool)
continueInterceptedRequest
public Task<ContinueInterceptedRequestCommandResponse> ContinueInterceptedRequest(ContinueInterceptedRequestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ContinueInterceptedRequestCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
DeleteCookies(DeleteCookiesCommandSettings, CancellationToken, int?, bool)
deleteCookies
public Task<DeleteCookiesCommandResponse> DeleteCookies(DeleteCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
DeleteCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Disable(DisableCommandSettings, CancellationToken, int?, bool)
disable
public Task<DisableCommandResponse> Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
DisableCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
EmulateNetworkConditions(EmulateNetworkConditionsCommandSettings, CancellationToken, int?, bool)
emulateNetworkConditions
public Task<EmulateNetworkConditionsCommandResponse> EmulateNetworkConditions(EmulateNetworkConditionsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
EmulateNetworkConditionsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Enable(EnableCommandSettings, CancellationToken, int?, bool)
enable
public Task<EnableCommandResponse> Enable(EnableCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
EnableCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetAllCookies(GetAllCookiesCommandSettings, CancellationToken, int?, bool)
getAllCookies
public Task<GetAllCookiesCommandResponse> GetAllCookies(GetAllCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetAllCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetCertificate(GetCertificateCommandSettings, CancellationToken, int?, bool)
getCertificate
public Task<GetCertificateCommandResponse> GetCertificate(GetCertificateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetCertificateCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetCookies(GetCookiesCommandSettings, CancellationToken, int?, bool)
getCookies
public Task<GetCookiesCommandResponse> GetCookies(GetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetRequestPostData(GetRequestPostDataCommandSettings, CancellationToken, int?, bool)
getRequestPostData
public Task<GetRequestPostDataCommandResponse> GetRequestPostData(GetRequestPostDataCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetRequestPostDataCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetResponseBody(GetResponseBodyCommandSettings, CancellationToken, int?, bool)
getResponseBody
public Task<GetResponseBodyCommandResponse> GetResponseBody(GetResponseBodyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetResponseBodyCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetResponseBodyForInterception(GetResponseBodyForInterceptionCommandSettings, CancellationToken, int?, bool)
getResponseBodyForInterception
public Task<GetResponseBodyForInterceptionCommandResponse> GetResponseBodyForInterception(GetResponseBodyForInterceptionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetResponseBodyForInterceptionCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ReplayXHR(ReplayXHRCommandSettings, CancellationToken, int?, bool)
replayXHR
public Task<ReplayXHRCommandResponse> ReplayXHR(ReplayXHRCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ReplayXHRCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SearchInResponseBody(SearchInResponseBodyCommandSettings, CancellationToken, int?, bool)
searchInResponseBody
public Task<SearchInResponseBodyCommandResponse> SearchInResponseBody(SearchInResponseBodyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SearchInResponseBodyCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetBlockedURLs(SetBlockedURLsCommandSettings, CancellationToken, int?, bool)
setBlockedURLs
public Task<SetBlockedURLsCommandResponse> SetBlockedURLs(SetBlockedURLsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetBlockedURLsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetBypassServiceWorker(SetBypassServiceWorkerCommandSettings, CancellationToken, int?, bool)
setBypassServiceWorker
public Task<SetBypassServiceWorkerCommandResponse> SetBypassServiceWorker(SetBypassServiceWorkerCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetBypassServiceWorkerCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetCacheDisabled(SetCacheDisabledCommandSettings, CancellationToken, int?, bool)
setCacheDisabled
public Task<SetCacheDisabledCommandResponse> SetCacheDisabled(SetCacheDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetCacheDisabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetCookie(SetCookieCommandSettings, CancellationToken, int?, bool)
setCookie
public Task<SetCookieCommandResponse> SetCookie(SetCookieCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetCookieCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetCookies(SetCookiesCommandSettings, CancellationToken, int?, bool)
setCookies
public Task<SetCookiesCommandResponse> SetCookies(SetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetCookiesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDataSizeLimitsForTest(SetDataSizeLimitsForTestCommandSettings, CancellationToken, int?, bool)
setDataSizeLimitsForTest
public Task<SetDataSizeLimitsForTestCommandResponse> SetDataSizeLimitsForTest(SetDataSizeLimitsForTestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDataSizeLimitsForTestCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetExtraHTTPHeaders(SetExtraHTTPHeadersCommandSettings, CancellationToken, int?, bool)
setExtraHTTPHeaders
public Task<SetExtraHTTPHeadersCommandResponse> SetExtraHTTPHeaders(SetExtraHTTPHeadersCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetExtraHTTPHeadersCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetRequestInterception(SetRequestInterceptionCommandSettings, CancellationToken, int?, bool)
setRequestInterception
public Task<SetRequestInterceptionCommandResponse> SetRequestInterception(SetRequestInterceptionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetRequestInterceptionCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetUserAgentOverride(SetUserAgentOverrideCommandSettings, CancellationToken, int?, bool)
setUserAgentOverride
public Task<SetUserAgentOverrideCommandResponse> SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetUserAgentOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
TakeResponseBodyForInterceptionAsStream(TakeResponseBodyForInterceptionAsStreamCommandSettings, CancellationToken, int?, bool)
takeResponseBodyForInterceptionAsStream
public Task<TakeResponseBodyForInterceptionAsStreamCommandResponse> TakeResponseBodyForInterceptionAsStream(TakeResponseBodyForInterceptionAsStreamCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
TakeResponseBodyForInterceptionAsStreamCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Events
DataReceived
dataReceived
public event EventHandler<DataReceivedEventArgs> DataReceived
Event Type
EventSourceMessageReceived
eventSourceMessageReceived
public event EventHandler<EventSourceMessageReceivedEventArgs> EventSourceMessageReceived
Event Type
LoadingFailed
loadingFailed
public event EventHandler<LoadingFailedEventArgs> LoadingFailed
Event Type
LoadingFinished
loadingFinished
public event EventHandler<LoadingFinishedEventArgs> LoadingFinished
Event Type
RequestIntercepted
requestIntercepted
public event EventHandler<RequestInterceptedEventArgs> RequestIntercepted
Event Type
RequestServedFromCache
requestServedFromCache
public event EventHandler<RequestServedFromCacheEventArgs> RequestServedFromCache
Event Type
RequestWillBeSent
requestWillBeSent
public event EventHandler<RequestWillBeSentEventArgs> RequestWillBeSent
Event Type
RequestWillBeSentExtraInfo
requestWillBeSentExtraInfo
public event EventHandler<RequestWillBeSentExtraInfoEventArgs> RequestWillBeSentExtraInfo
Event Type
ResourceChangedPriority
resourceChangedPriority
public event EventHandler<ResourceChangedPriorityEventArgs> ResourceChangedPriority
Event Type
ResponseReceived
responseReceived
public event EventHandler<ResponseReceivedEventArgs> ResponseReceived
Event Type
ResponseReceivedExtraInfo
responseReceivedExtraInfo
public event EventHandler<ResponseReceivedExtraInfoEventArgs> ResponseReceivedExtraInfo
Event Type
SignedExchangeReceived
signedExchangeReceived
public event EventHandler<SignedExchangeReceivedEventArgs> SignedExchangeReceived
Event Type
WebSocketClosed
webSocketClosed
public event EventHandler<WebSocketClosedEventArgs> WebSocketClosed
Event Type
WebSocketCreated
webSocketCreated
public event EventHandler<WebSocketCreatedEventArgs> WebSocketCreated
Event Type
WebSocketFrameError
webSocketFrameError
public event EventHandler<WebSocketFrameErrorEventArgs> WebSocketFrameError
Event Type
WebSocketFrameReceived
webSocketFrameReceived
public event EventHandler<WebSocketFrameReceivedEventArgs> WebSocketFrameReceived
Event Type
WebSocketFrameSent
webSocketFrameSent
public event EventHandler<WebSocketFrameSentEventArgs> WebSocketFrameSent
Event Type
WebSocketHandshakeResponseReceived
webSocketHandshakeResponseReceived
public event EventHandler<WebSocketHandshakeResponseReceivedEventArgs> WebSocketHandshakeResponseReceived
Event Type
WebSocketWillSendHandshakeRequest
webSocketWillSendHandshakeRequest
public event EventHandler<WebSocketWillSendHandshakeRequestEventArgs> WebSocketWillSendHandshakeRequest