A page with proprietary JS code, heavily closured and unmodifiable, fetches a few XHR's and plain GET's of auxiliary data early in the loading, complete with tokens in the URI and cookies in the headers and so difficult to reconstruct generically. I can't find a way to get the functions that trigger these requests to fire again; there isn't a button or anything. I would like to augment that page's functionality by manipulating fetched data by way of a bookmarklet, or if I must, an extension. Is there a way to retrieve past XHR/GET attributes later on, without having had intercepted them first?
Asked
Active
Viewed 274 times
0
-
Is the requirement to get the URL's requested? – guest271314 Feb 05 '19 at 01:18
-
Sorry, I don't get the question. Could you elaborate on what you want to know? – Dan Feb 05 '19 at 12:11
-
Are you trying to get the URL's and content of the requests made at the document? – guest271314 Feb 05 '19 at 14:26
-
Yes—as the page loads, it makes those requests, and I was wondering if this was accessible later on. I realize this is easily done using an extension, which can execute before the page even begins to load and simply intercept those requests (I need just the URL's at the very least, but the requested content could also suffice), and that's what I'll resort to, I guess. – Dan Feb 06 '19 at 12:13
-
You can try using `PerformanceObserver`, see [Count console.log objects](https://stackoverflow.com/questions/41167305/); [Handling similar to ?](https://stackoverflow.com/questions/41497274/), or if you are not able to define the observer before the requests are made you can use DevTools to get all requested content as a `.har` file [Fast way to download data:image from chromes developer tools network window?](https://stackoverflow.com/q/45133866/). – guest271314 Feb 06 '19 at 13:46