Reputation: 673
I am clicking a button in chrome upon which a POST request is sent to the server. I want to capture this request without actually sending the request to the server something like a dry run.
Because if I let this request succeed and I replay it, I know the backend will throw the exception. Another reason is that the front end is dynamically setting a lot of fields every time.
If I can do this, I can easily copy the request body and play around with it.
Can we do something like blocking a request ? Does chrome or any browser support it or is there an extension?
Upvotes: 1
Views: 147
Reputation: 673
Go to the Network tab in Chrome. On top, you can see a dropdown with Online selected by default. Select offline.
Now send the request. You will see the request fails as if the network is disconnected.
Upvotes: 1