Liking cljdoc? Tell your friends :D

clj-chrome-devtools.commands.network

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 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.
raw docstring

can-clear-browser-cacheclj

(can-clear-browser-cache)
(can-clear-browser-cache {:as params :keys []})
(can-clear-browser-cache connection {:as params :keys []})

Tells whether clearing browser cache is supported.

Return map keys:

KeyDescription
:resultTrue if browser cache can be cleared.
Tells whether clearing browser cache is supported.

Return map keys:


  Key     | Description 
  --------|------------ 
  :result | True if browser cache can be cleared.
sourceraw docstring

can-clear-browser-cookiesclj

(can-clear-browser-cookies)
(can-clear-browser-cookies {:as params :keys []})
(can-clear-browser-cookies connection {:as params :keys []})

Tells whether clearing browser cookies is supported.

Return map keys:

KeyDescription
:resultTrue if browser cookies can be cleared.
Tells whether clearing browser cookies is supported.

Return map keys:


  Key     | Description 
  --------|------------ 
  :result | True if browser cookies can be cleared.
sourceraw docstring

can-emulate-network-conditionsclj

(can-emulate-network-conditions)
(can-emulate-network-conditions {:as params :keys []})
(can-emulate-network-conditions connection {:as params :keys []})

Tells whether emulation of network conditions is supported.

Return map keys:

KeyDescription
:resultTrue if emulation of network conditions is supported.
Tells whether emulation of network conditions is supported.

Return map keys:


  Key     | Description 
  --------|------------ 
  :result | True if emulation of network conditions is supported.
sourceraw docstring

clear-browser-cacheclj

(clear-browser-cache)
(clear-browser-cache {:as params :keys []})
(clear-browser-cache connection {:as params :keys []})

Clears browser cache.

Clears browser cache.
sourceraw docstring

clear-browser-cookiesclj

(clear-browser-cookies)
(clear-browser-cookies {:as params :keys []})
(clear-browser-cookies connection {:as params :keys []})

Clears browser cookies.

Clears browser cookies.
sourceraw docstring

continue-intercepted-requestclj

(continue-intercepted-request)
(continue-intercepted-request {:as params
                               :keys [interception-id error-reason raw-response
                                      url method post-data headers
                                      auth-challenge-response]})
(continue-intercepted-request connection
                              {:as params
                               :keys [interception-id error-reason raw-response
                                      url method post-data headers
                                      auth-challenge-response]})

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.

Parameters map keys:

KeyDescription
:interception-idnull
:error-reasonIf set this causes the request to fail with the given reason. Passing Aborted for requests marked with isNavigationRequest also cancels the navigation. Must not be set in response to an authChallenge. (optional)
:raw-responseIf set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. (optional)
:urlIf set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. (optional)
:methodIf set this allows the request method to be overridden. Must not be set in response to an authChallenge. (optional)
:post-dataIf set this allows postData to be set. Must not be set in response to an authChallenge. (optional)
:headersIf set this allows the request headers to be changed. Must not be set in response to an authChallenge. (optional)
:auth-challenge-responseResponse to a requestIntercepted with an authChallenge. Must not be set otherwise. (optional)
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.

Parameters map keys:


  Key                      | Description 
  -------------------------|------------ 
  :interception-id         | null
  :error-reason            | If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge. (optional)
  :raw-response            | If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. (optional)
  :url                     | If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. (optional)
  :method                  | If set this allows the request method to be overridden. Must not be set in response to an authChallenge. (optional)
  :post-data               | If set this allows postData to be set. Must not be set in response to an authChallenge. (optional)
  :headers                 | If set this allows the request headers to be changed. Must not be set in response to an authChallenge. (optional)
  :auth-challenge-response | Response to a requestIntercepted with an authChallenge. Must not be set otherwise. (optional)
sourceraw docstring

delete-cookiesclj

(delete-cookies)
(delete-cookies {:as params :keys [name url domain path]})
(delete-cookies connection {:as params :keys [name url domain path]})

Deletes browser cookies with matching name and url or domain/path pair.

Parameters map keys:

KeyDescription
:nameName of the cookies to remove.
:urlIf specified, deletes all the cookies with the given name where domain and path match provided URL. (optional)
:domainIf specified, deletes only cookies with the exact domain. (optional)
:pathIf specified, deletes only cookies with the exact path. (optional)
Deletes browser cookies with matching name and url or domain/path pair.

Parameters map keys:


  Key     | Description 
  --------|------------ 
  :name   | Name of the cookies to remove.
  :url    | If specified, deletes all the cookies with the given name where domain and path match provided URL. (optional)
  :domain | If specified, deletes only cookies with the exact domain. (optional)
  :path   | If specified, deletes only cookies with the exact path. (optional)
sourceraw docstring

disableclj

(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})

Disables network tracking, prevents network events from being sent to the client.

Disables network tracking, prevents network events from being sent to the client.
sourceraw docstring

emulate-network-conditionsclj

(emulate-network-conditions)
(emulate-network-conditions {:as params
                             :keys [offline latency download-throughput
                                    upload-throughput connection-type]})
(emulate-network-conditions connection
                            {:as params
                             :keys [offline latency download-throughput
                                    upload-throughput connection-type]})

Activates emulation of network conditions.

Parameters map keys:

KeyDescription
:offlineTrue to emulate internet disconnection.
:latencyAdditional latency (ms).
:download-throughputMaximal aggregated download throughput.
:upload-throughputMaximal aggregated upload throughput.
:connection-typeConnection type if known. (optional)
Activates emulation of network conditions.

Parameters map keys:


  Key                  | Description 
  ---------------------|------------ 
  :offline             | True to emulate internet disconnection.
  :latency             | Additional latency (ms).
  :download-throughput | Maximal aggregated download throughput.
  :upload-throughput   | Maximal aggregated upload throughput.
  :connection-type     | Connection type if known. (optional)
sourceraw docstring

enableclj

(enable)
(enable {:as params :keys [max-total-buffer-size max-resource-buffer-size]})
(enable connection
        {:as params :keys [max-total-buffer-size max-resource-buffer-size]})

Enables network tracking, network events will now be delivered to the client.

Parameters map keys:

KeyDescription
:max-total-buffer-sizeBuffer size in bytes to use when preserving network payloads (XHRs, etc). (optional)
:max-resource-buffer-sizePer-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). (optional)
Enables network tracking, network events will now be delivered to the client.

Parameters map keys:


  Key                       | Description 
  --------------------------|------------ 
  :max-total-buffer-size    | Buffer size in bytes to use when preserving network payloads (XHRs, etc). (optional)
  :max-resource-buffer-size | Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). (optional)
sourceraw docstring

get-all-cookiesclj

(get-all-cookies)
(get-all-cookies {:as params :keys []})
(get-all-cookies connection {:as params :keys []})

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.

Return map keys:

KeyDescription
:cookiesArray of cookie objects.
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field.

Return map keys:


  Key      | Description 
  ---------|------------ 
  :cookies | Array of cookie objects.
sourceraw docstring

get-certificateclj

(get-certificate)
(get-certificate {:as params :keys [origin]})
(get-certificate connection {:as params :keys [origin]})

Returns the DER-encoded certificate.

Parameters map keys:

KeyDescription
:originOrigin to get certificate for.

Return map keys:

KeyDescription
:table-namesnull
Returns the DER-encoded certificate.

Parameters map keys:


  Key     | Description 
  --------|------------ 
  :origin | Origin to get certificate for.

Return map keys:


  Key          | Description 
  -------------|------------ 
  :table-names | null
sourceraw docstring

get-cookiesclj

(get-cookies)
(get-cookies {:as params :keys [urls]})
(get-cookies connection {:as params :keys [urls]})

Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.

Parameters map keys:

KeyDescription
:urlsThe list of URLs for which applicable cookies will be fetched (optional)

Return map keys:

KeyDescription
:cookiesArray of cookie objects.
Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field.

Parameters map keys:


  Key   | Description 
  ------|------------ 
  :urls | The list of URLs for which applicable cookies will be fetched (optional)

Return map keys:


  Key      | Description 
  ---------|------------ 
  :cookies | Array of cookie objects.
sourceraw docstring

get-response-bodyclj

(get-response-body)
(get-response-body {:as params :keys [request-id]})
(get-response-body connection {:as params :keys [request-id]})

Returns content served for the given request.

Parameters map keys:

KeyDescription
:request-idIdentifier of the network request to get content for.

Return map keys:

KeyDescription
:bodyResponse body.
:base64-encodedTrue, if content was sent as base64.
Returns content served for the given request.

Parameters map keys:


  Key         | Description 
  ------------|------------ 
  :request-id | Identifier of the network request to get content for.

Return map keys:


  Key             | Description 
  ----------------|------------ 
  :body           | Response body.
  :base64-encoded | True, if content was sent as base64.
sourceraw docstring

replay-xhrclj

(replay-xhr)
(replay-xhr {:as params :keys [request-id]})
(replay-xhr connection {:as params :keys [request-id]})

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.

Parameters map keys:

KeyDescription
:request-idIdentifier of XHR to replay.
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.

Parameters map keys:


  Key         | Description 
  ------------|------------ 
  :request-id | Identifier of XHR to replay.
sourceraw docstring

set-blocked-ur-lsclj

(set-blocked-ur-ls)
(set-blocked-ur-ls {:as params :keys [urls]})
(set-blocked-ur-ls connection {:as params :keys [urls]})

Blocks URLs from loading.

Parameters map keys:

KeyDescription
:urlsURL patterns to block. Wildcards ('*') are allowed.
Blocks URLs from loading.

Parameters map keys:


  Key   | Description 
  ------|------------ 
  :urls | URL patterns to block. Wildcards ('*') are allowed.
sourceraw docstring

set-bypass-service-workerclj

(set-bypass-service-worker)
(set-bypass-service-worker {:as params :keys [bypass]})
(set-bypass-service-worker connection {:as params :keys [bypass]})

Toggles ignoring of service worker for each request.

Parameters map keys:

KeyDescription
:bypassBypass service worker and load from network.
Toggles ignoring of service worker for each request.

Parameters map keys:


  Key     | Description 
  --------|------------ 
  :bypass | Bypass service worker and load from network.
sourceraw docstring

set-cache-disabledclj

(set-cache-disabled)
(set-cache-disabled {:as params :keys [cache-disabled]})
(set-cache-disabled connection {:as params :keys [cache-disabled]})

Toggles ignoring cache for each request. If true, cache will not be used.

Parameters map keys:

KeyDescription
:cache-disabledCache disabled state.
Toggles ignoring cache for each request. If `true`, cache will not be used.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :cache-disabled | Cache disabled state.
sourceraw docstring

(set-cookie)
(set-cookie {:as params
             :keys [name value url domain path secure http-only same-site
                    expires]})
(set-cookie connection
            {:as params
             :keys [name value url domain path secure http-only same-site
                    expires]})

Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.

Parameters map keys:

KeyDescription
:nameCookie name.
:valueCookie value.
:urlThe request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. (optional)
:domainCookie domain. (optional)
:pathCookie path. (optional)
:secureTrue if cookie is secure. (optional)
:http-onlyTrue if cookie is http-only. (optional)
:same-siteCookie SameSite type. (optional)
:expiresCookie expiration date, session cookie if not set (optional)

Return map keys:

KeyDescription
:successTrue if successfully set cookie.
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.

Parameters map keys:


  Key        | Description 
  -----------|------------ 
  :name      | Cookie name.
  :value     | Cookie value.
  :url       | The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. (optional)
  :domain    | Cookie domain. (optional)
  :path      | Cookie path. (optional)
  :secure    | True if cookie is secure. (optional)
  :http-only | True if cookie is http-only. (optional)
  :same-site | Cookie SameSite type. (optional)
  :expires   | Cookie expiration date, session cookie if not set (optional)

Return map keys:


  Key      | Description 
  ---------|------------ 
  :success | True if successfully set cookie.
sourceraw docstring

set-cookiesclj

(set-cookies)
(set-cookies {:as params :keys [cookies]})
(set-cookies connection {:as params :keys [cookies]})

Sets given cookies.

Parameters map keys:

KeyDescription
:cookiesCookies to be set.
Sets given cookies.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :cookies | Cookies to be set.
sourceraw docstring

set-data-size-limits-for-testclj

(set-data-size-limits-for-test)
(set-data-size-limits-for-test {:as params
                                :keys [max-total-size max-resource-size]})
(set-data-size-limits-for-test connection
                               {:as params
                                :keys [max-total-size max-resource-size]})

For testing.

Parameters map keys:

KeyDescription
:max-total-sizeMaximum total buffer size.
:max-resource-sizeMaximum per-resource size.
For testing.

Parameters map keys:


  Key                | Description 
  -------------------|------------ 
  :max-total-size    | Maximum total buffer size.
  :max-resource-size | Maximum per-resource size.
sourceraw docstring

set-extra-http-headersclj

(set-extra-http-headers)
(set-extra-http-headers {:as params :keys [headers]})
(set-extra-http-headers connection {:as params :keys [headers]})

Specifies whether to always send extra HTTP headers with the requests from this page.

Parameters map keys:

KeyDescription
:headersMap with extra HTTP headers.
Specifies whether to always send extra HTTP headers with the requests from this page.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :headers | Map with extra HTTP headers.
sourceraw docstring

set-request-interception-enabledclj

(set-request-interception-enabled)
(set-request-interception-enabled {:as params :keys [enabled]})
(set-request-interception-enabled connection {:as params :keys [enabled]})

Parameters map keys:

KeyDescription
:enabledWhether or not HTTP requests should be intercepted and Network.requestIntercepted events sent.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :enabled | Whether or not HTTP requests should be intercepted and Network.requestIntercepted events sent.
sourceraw docstring

set-user-agent-overrideclj

(set-user-agent-override)
(set-user-agent-override {:as params :keys [user-agent]})
(set-user-agent-override connection {:as params :keys [user-agent]})

Allows overriding user agent with the given string.

Parameters map keys:

KeyDescription
:user-agentUser agent to use.
Allows overriding user agent with the given string.

Parameters map keys:


  Key         | Description 
  ------------|------------ 
  :user-agent | User agent to use.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close