class NetworkOperations
(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
Protocol Network domain documentation.
fun
Tells whether clearing browser cache is supported. |
|
fun
Tells whether clearing browser cookies is supported. |
|
fun
Tells whether emulation of network conditions is supported. |
|
fun clearBrowserCache(): Single<ResponseFrame>
Clears browser cache. |
|
fun clearBrowserCookies(): Single<ResponseFrame>
Clears browser cookies. |
|
fun
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. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead. |
|
fun dataReceived(): Flowable<DataReceivedEvent>
Fired when data chunk was received over the network. |
|
fun deleteCookies(input: DeleteCookiesRequest): Single<ResponseFrame>
Deletes browser cookies with matching name and url or domain/path pair. |
|
fun disable(): Single<ResponseFrame>
Disables network tracking, prevents network events from being sent to the client. |
|
fun emulateNetworkConditions(input: EmulateNetworkConditionsRequest): Single<ResponseFrame>
Activates emulation of network conditions. |
|
fun enable(input: EnableRequest): Single<ResponseFrame>
Enables network tracking, network events will now be delivered to the client. |
|
fun events(): Flowable<Event>
Returns flowable capturing all Network domains events. |
|
fun eventSourceMessageReceived(): Flowable<EventSourceMessageReceivedEvent>
Fired when EventSource message is received. |
|
fun getAllCookies(): Single<GetAllCookiesResponse>
Returns all browser cookies. Depending on the backend support, will return detailed cookie
information in the |
|
fun getCertificate(input: GetCertificateRequest): Single<GetCertificateResponse>
Returns the DER-encoded certificate. |
|
fun getCookies(input: GetCookiesRequest): Single<GetCookiesResponse>
Returns all browser cookies for the current URL. Depending on the backend support, will return
detailed cookie information in the |
|
fun getRequestPostData(input: GetRequestPostDataRequest): Single<GetRequestPostDataResponse>
Returns post data sent with the request. Returns an error when no data was sent with the request. |
|
fun getResponseBody(input: GetResponseBodyRequest): Single<GetResponseBodyResponse>
Returns content served for the given request. |
|
fun getResponseBodyForInterception(input: GetResponseBodyForInterceptionRequest): Single<GetResponseBodyForInterceptionResponse>
Returns content served for the given currently intercepted request. |
|
fun loadingFailed(): Flowable<LoadingFailedEvent>
Fired when HTTP request has failed to load. |
|
fun loadingFinished(): Flowable<LoadingFinishedEvent>
Fired when HTTP request has finished loading. |
|
fun replayXHR(input: ReplayXHRRequest): Single<ResponseFrame>
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. |
|
fun requestIntercepted(): Flowable<RequestInterceptedEvent>
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead. |
|
fun requestServedFromCache(): Flowable<RequestServedFromCacheEvent>
Fired if request ended up loading from cache. |
|
fun requestWillBeSent(): Flowable<RequestWillBeSentEvent>
Fired when page is about to send HTTP request. |
|
fun requestWillBeSentExtraInfo(): Flowable<RequestWillBeSentExtraInfoEvent>
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. |
|
fun resourceChangedPriority(): Flowable<ResourceChangedPriorityEvent>
Fired when resource loading priority is changed |
|
fun responseReceived(): Flowable<ResponseReceivedEvent>
Fired when HTTP response is available. |
|
fun responseReceivedExtraInfo(): Flowable<ResponseReceivedExtraInfoEvent>
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. |
|
fun searchInResponseBody(input: SearchInResponseBodyRequest): Single<SearchInResponseBodyResponse>
Searches for given string in response content. |
|
fun setBlockedURLs(input: SetBlockedURLsRequest): Single<ResponseFrame>
Blocks URLs from loading. |
|
fun setBypassServiceWorker(input: SetBypassServiceWorkerRequest): Single<ResponseFrame>
Toggles ignoring of service worker for each request. |
|
fun setCacheDisabled(input: SetCacheDisabledRequest): Single<ResponseFrame>
Toggles ignoring cache for each request. If |
|
fun setCookie(input: SetCookieRequest): Single<SetCookieResponse>
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. |
|
fun setCookies(input: SetCookiesRequest): Single<ResponseFrame>
Sets given cookies. |
|
fun setDataSizeLimitsForTest(input: SetDataSizeLimitsForTestRequest): Single<ResponseFrame>
For testing. |
|
fun setExtraHTTPHeaders(input: SetExtraHTTPHeadersRequest): Single<ResponseFrame>
Specifies whether to always send extra HTTP headers with the requests from this page. |
|
fun
Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead. |
|
fun setUserAgentOverride(input: SetUserAgentOverrideRequest): Single<ResponseFrame>
Allows overriding user agent with the given string. |
|
fun signedExchangeReceived(): Flowable<SignedExchangeReceivedEvent>
Fired when a signed exchange was received over the network |
|
fun takeResponseBodyForInterceptionAsStream(input: TakeResponseBodyForInterceptionAsStreamRequest): Single<TakeResponseBodyForInterceptionAsStreamResponse>
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. |
|
fun webSocketClosed(): Flowable<WebSocketClosedEvent>
Fired when WebSocket is closed. |
|
fun webSocketCreated(): Flowable<WebSocketCreatedEvent>
Fired upon WebSocket creation. |
|
fun webSocketFrameError(): Flowable<WebSocketFrameErrorEvent>
Fired when WebSocket message error occurs. |
|
fun webSocketFrameReceived(): Flowable<WebSocketFrameReceivedEvent>
Fired when WebSocket message is received. |
|
fun webSocketFrameSent(): Flowable<WebSocketFrameSentEvent>
Fired when WebSocket message is sent. |
|
fun webSocketHandshakeResponseReceived(): Flowable<WebSocketHandshakeResponseReceivedEvent>
Fired when WebSocket handshake response becomes available. |
|
fun webSocketWillSendHandshakeRequest(): Flowable<WebSocketWillSendHandshakeRequestEvent>
Fired when WebSocket is about to initiate handshake. |