loadNetworkResource method

Future<LoadNetworkResourcePageResult> loadNetworkResource(
  1. String url,
  2. LoadNetworkResourceOptions options, {
  3. FrameId? frameId,
})

Fetches the resource and returns the content. frameId Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets. url URL of the resource to get content for. options Options for the request.

Implementation

Future<LoadNetworkResourcePageResult> loadNetworkResource(
    String url, LoadNetworkResourceOptions options,
    {page.FrameId? frameId}) async {
  var result = await _client.send('Network.loadNetworkResource', {
    'url': url,
    'options': options,
    if (frameId != null) 'frameId': frameId,
  });
  return LoadNetworkResourcePageResult.fromJson(
      result['resource'] as Map<String, dynamic>);
}