← Back to Network domain

Network.getResponseBodyForInterception

Returns content served for the given currently intercepted request.

Domain: Network experimental

Parameters

NameTypeDescription
interceptionIdInterceptionIdIdentifier for the intercepted request to get body for.

Returns

NameTypeDescription
bodystringResponse body.
base64EncodedbooleanTrue, if content was sent as base64.

Example Request

{
  "id": 1,
  "method": "Network.getResponseBodyForInterception",
  "params": {
    "interceptionId": "interceptionId-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "body": "body-value",
    "base64Encoded": true
  }
}

Usage in Node.js

const result = await send('Network.getResponseBodyForInterception', {"interceptionId": "interceptionId-value"});
console.log(result);
// {"body": "body-value", "base64Encoded": true}