enable

suspend fun enable(args: Network.EnableParameter, mode: CommandMode = CommandMode.DEFAULT)

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


suspend fun enable(maxTotalBufferSize: Int? = null, maxResourceBufferSize: Int? = null, maxPostDataSize: Int? = null, reportDirectSocketTraffic: Boolean? = null, enableDurableMessages: Boolean? = null)

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

Parameters

maxTotalBufferSize

Buffer size in bytes to use when preserving network payloads (XHRs, etc). This is the maximum number of bytes that will be collected by this DevTools session.

maxResourceBufferSize

Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).

maxPostDataSize

Longest post body size (in bytes) that would be included in requestWillBeSent notification

reportDirectSocketTraffic

Whether DirectSocket chunk send/receive events should be reported.

enableDurableMessages

Enable storing response bodies outside of renderer, so that these survive a cross-process navigation. Requires maxTotalBufferSize to be set. Currently defaults to false. This field is being deprecated in favor of the dedicated configureDurableMessages command, due to the possibility of deadlocks when awaiting Network.enable before issuing Runtime.runIfWaitingForDebugger.