devtools_network actions and need a running devtools_session on the tab. Pass the intended browser’s tabId on each call. They are undone when the last agent stops the inspection session.
Firefox and Zen developer sessions support mocks, blocking, cache control and HAR export through BiDi, but network and CPU throttling are unavailable. Response-body capture depends on the browser build. Firefox extension mode does not provide network capture or interception. See Firefox and Zen coverage.
Mock a response
pattern is a URL glob. response takes status, headers, contentType, and either body (string) or json. rules lists active mocks, unmock removes one by pattern. Mocks use browser network interception, so they also cover requests made before the page’s JavaScript runs.
Block requests
unblock lifts them. For a policy that persists across tabs and sessions, use browser_policy instead; see Domain policies.
Throttle
none, offline, slow3g, fast3g, 4g, or custom latencyMs, downloadKbps, uploadKbps. CPU throttling lives in devtools_emulation {action: "cpu", rate}.
Cache
{ "action": "cache", "disabled": true } is the “Disable cache” checkbox.
Replay
Export
{ "action": "har" } writes a HAR file of everything captured to the artifacts directory. It opens in Chrome’s Network panel, Charles, Proxyman and friends.