DocsNetwork Interceptionbrowser_enable_network_interception

browser_enable_network_interception

Browser Enable Network Interception

Enable or disable network interception for a context. When disabled, all rules are ignored and requests pass through normally. When enabled, rules start applying. Useful for toggling interception without removing rules.

Usage Example

123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.enable_network_interception(
context_id=context_id,
enable=True
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

enablebooleanrequired

Set to true to enable network interception (rules start applying), false to disable. When disabled, all requests pass through normally regardless of rules

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}