← Back to Network domain

Network.loadNetworkResource

Fetches the resource and returns the content.

Domain: Network experimental

Parameters

NameTypeDescription
frameId (optional)Page.FrameIdFrame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.
urlstringURL of the resource to get content for.
optionsLoadNetworkResourceOptionsOptions for the request.

Returns

NameTypeDescription
resourceLoadNetworkResourcePageResult

Example Request

{
  "id": 1,
  "method": "Network.loadNetworkResource",
  "params": {
    "url": "https://example.com",
    "options": "options-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "resource": "resource-value"
  }
}

Usage in Node.js

const result = await send('Network.loadNetworkResource', {"url": "https://example.com", "options": "options-value"});
console.log(result);
// {"resource": "resource-value"}