← Back to Network domain
Network.searchInResponseBody
Searches for given string in response content.
Domain: Network
experimental
Parameters
| Name | Type | Description |
requestId | RequestId | Identifier of the network response to search. |
query | string | String to search for. |
caseSensitive (optional) | boolean | If true, search is case sensitive. |
isRegex (optional) | boolean | If true, treats string parameter as regex. |
Returns
| Name | Type | Description |
result | array | List of search matches. |
Example Request
{
"id": 1,
"method": "Network.searchInResponseBody",
"params": {
"requestId": "request-1",
"query": "query-value"
}
}
Example Response
{
"id": 1,
"result": {
"result": {
"type": "string",
"value": "Example Domain"
}
}
}
Usage in Node.js
const result = await send('Network.searchInResponseBody', {"requestId": "request-1", "query": "query-value"});
console.log(result);
// {"result": {"type": "string", "value": "Example Domain"}}