I’m trying to build a chrome extension that will look for the response of a url that contains “bounds” . The full URL is:
https://www.land.com/api/0/United-States/all-land/zoom-12/bounds-38.487397840020606-n98.67873224975584-38.67660627098903-n98.39205775024412/?sk=_cljFjdpxQz^utWzgJnbFwy@|`U_mIwnC
I’m starting with a sanity check to make sure that I am selecting the right URL:
function handleRequestFinished(request) {
if (
request.request.url.includes("bounds") &&
request.request.url.includes("land")
) {
console.log("---------------------------------");
console.log(request.request.url);
console.log("request");
console.log("---------------------------------");
}
}
chrome.devtools.network.onRequestFinished.addListener(handleRequestFinished);
However I am getting all kinds of urls printed to the console which do not appear to have either of the conditions met. What am I doing wrong?