Filter by URL Matching
URL Filtering
Requests can be captured by using the network_capture
field, 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:
Exact Match Filtering
In the this example, 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 Filtering
In the this example, we ask to capture all .css requests by searching for requests to URLs that include ".css
". 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.
Example Request
Example Response
In the example response above, we see that network capture returns:
filter - the filter that was defined initially.
result - the requests found that match the filter
request - the headers and metadata of the request.
response - the headers and data of the response.
body - under response,
body
will contain the contents of the captured resource.
Last updated