Class Network
Class providing functionality for manipulating network calls using DevTools Protocol commands
public abstract class Network
- Inheritance
-
Network
- Derived
- Inherited Members
Methods
AddResponseBody(HttpResponseData)
Asynchronously adds the response body to the provided HttpResponseData object.
public abstract Task AddResponseBody(HttpResponseData responseData)
Parameters
responseData
HttpResponseDataThe HttpResponseData object to which to add the response body.
Returns
- Task
A task that represents the asynchronous operation.
CancelAuth(string)
Asynchronously cancels authorization of an intercepted network request.
public abstract Task CancelAuth(string requestId)
Parameters
requestId
stringThe ID of the network request for which to cancel authentication.
Returns
- Task
A task that represents the asynchronous operation.
ContinueRequest(HttpRequestData)
Asynchronously continues an intercepted network request.
public abstract Task ContinueRequest(HttpRequestData requestData)
Parameters
requestData
HttpRequestDataThe HttpRequestData of the request.
Returns
- Task
A task that represents the asynchronous operation.
ContinueRequestWithResponse(HttpRequestData, HttpResponseData)
Asynchronously continues an intercepted network request and returns the specified response.
public abstract Task ContinueRequestWithResponse(HttpRequestData requestData, HttpResponseData responseData)
Parameters
requestData
HttpRequestDataThe HttpRequestData of the request.
responseData
HttpResponseDataThe HttpResponseData with which to respond to the request
Returns
- Task
A task that represents the asynchronous operation.
ContinueRequestWithoutModification(HttpRequestData)
Asynchronously contines an intercepted network request without modification.
public abstract Task ContinueRequestWithoutModification(HttpRequestData requestData)
Parameters
requestData
HttpRequestDataThe HttpRequestData of the network request.
Returns
- Task
A task that represents the asynchronous operation.
ContinueResponseWithoutModification(HttpResponseData)
Asynchronously continues an intercepted network response without modification.
public abstract Task ContinueResponseWithoutModification(HttpResponseData responseData)
Parameters
responseData
HttpResponseDataThe HttpResponseData of the network response.
Returns
- Task
A task that represents the asynchronous operation.
ContinueWithAuth(string, string, string)
Asynchronously continues an intercepted network call using authentication.
public abstract Task ContinueWithAuth(string requestId, string userName, string password)
Parameters
requestId
stringThe ID of the network request for which to continue with authentication.
userName
stringThe user name with which to authenticate.
password
stringThe password with which to authenticate.
Returns
- Task
A task that represents the asynchronous operation.
DisableFetch()
Asynchronously diables the fetch domain.
public abstract Task DisableFetch()
Returns
- Task
A task that represents the asynchronous operation.
DisableNetwork()
Asynchronously diables the fetch domain.
public abstract Task DisableNetwork()
Returns
- Task
A task that represents the asynchronous operation.
DisableNetworkCaching()
Asynchronously disables network caching.
public abstract Task DisableNetworkCaching()
Returns
- Task
A task that represents the asynchronous operation.
EnableFetchForAllPatterns()
Asynchronously enables the fetch domain for all URL patterns.
public abstract Task EnableFetchForAllPatterns()
Returns
- Task
A task that represents the asynchronous operation.
EnableNetwork()
Asynchronously enables the network domain.
public abstract Task EnableNetwork()
Returns
- Task
A task that represents the asynchronous operation.
EnableNetworkCaching()
Asynchronously enables network caching.
public abstract Task EnableNetworkCaching()
Returns
- Task
A task that represents the asynchronous operation.
OnAuthRequired(AuthRequiredEventArgs)
Raises the AuthRequired event.
protected virtual void OnAuthRequired(AuthRequiredEventArgs e)
Parameters
e
AuthRequiredEventArgsAn AuthRequiredEventArgs that contains the event data.
OnRequestPaused(RequestPausedEventArgs)
Raises the RequestPaused event.
protected virtual void OnRequestPaused(RequestPausedEventArgs e)
Parameters
e
RequestPausedEventArgsAn RequestPausedEventArgs that contains the event data.
OnResponsePaused(ResponsePausedEventArgs)
Raises the ResponseReceived event.
protected virtual void OnResponsePaused(ResponsePausedEventArgs e)
Parameters
e
ResponsePausedEventArgsAn ResponsePausedEventArgs that contains the event data.
SetUserAgentOverride(UserAgent)
Asynchronously sets the override of the user agent settings.
public abstract Task SetUserAgentOverride(UserAgent userAgent)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetUserAgentOverride(string)
Asynchronously sets the override of the user agent string.
public Task SetUserAgentOverride(string userAgent)
Parameters
userAgent
stringThe user agent string to set.
Returns
- Task
A task that represents the asynchronous operation.
Events
AuthRequired
Occurs when a network request requires authorization.
public event Network.AsyncEventHandler<AuthRequiredEventArgs> AuthRequired
Event Type
RequestPaused
Occurs when a network request is intercepted.
public event Network.AsyncEventHandler<RequestPausedEventArgs> RequestPaused
Event Type
ResponsePaused
Occurs when a network response is received.
public event Network.AsyncEventHandler<ResponsePausedEventArgs> ResponsePaused