I'm looking for a way to capture the exact requests that a webpage sends to its server, so I can replay those requests later, even if the website changes or updates. The idea is to save the API requests, and as long as the backend still allows those requests, I should be able to use them. Any suggestions on how to do this effectively?
3 Answers
Don't forget about URL query parameters and the HTTP request body; they can be essential for replicating the request accurately!
You can log the entire HTTP request, including headers, body, and cookies, and then replay it later. Just keep in mind that auth tokens and session data tend to expire, which can make this a bit tricky.
It's also worth asking why you need to replay the exact requests later. Wouldn't it make more sense for the API to allow this for consumers?

I found that a feature was removed from the site, but it still works on a tab where I haven't refreshed. That's why I want to replay the request.