enable method
Enables network tracking, network events will now be delivered to the client.
maxTotalBufferSize Buffer size in bytes to use when preserving network payloads (XHRs, etc).
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.
Implementation
Future<void> enable({
int? maxTotalBufferSize,
int? maxResourceBufferSize,
int? maxPostDataSize,
bool? reportDirectSocketTraffic,
}) async {
await _client.send('Network.enable', {
if (maxTotalBufferSize != null) 'maxTotalBufferSize': maxTotalBufferSize,
if (maxResourceBufferSize != null)
'maxResourceBufferSize': maxResourceBufferSize,
if (maxPostDataSize != null) 'maxPostDataSize': maxPostDataSize,
if (reportDirectSocketTraffic != null)
'reportDirectSocketTraffic': reportDirectSocketTraffic,
});
}