Requests can be captured by using the network_capturefield, which receives a JSON array that can include one or more filters. Each filter specifies which requests should be collected for later inspection.
The below example demonstrates two simple network capture filters, and how they are performed:
Network capture is only available when render is set to true.
Exact match filter
In the first example filter, we ask to capture requests that match the URL we've provided exactly and that only use the GET method. Exact matches are very precise and can be used when you've determined exactly which network request you'd like to capture.
Containing a match
In the second example filter, we ask to capture all GraphQL requests by searching for requests to URLs that include "/graphql/Search". The request method has been intentionally left out to capture requests using any method.
Using containing filters helps broaden our network captures, and can be very useful when needing all files of a certain type (css, js, etc.), a particular request that includes dynamic variables, or when the exact request is still not fully known.
Response
In the example below, we see a fictional response to the example above. Notice how each network capture filter is included in the response, along with the collected data: