Open
Description
🚀 Feature Request
I'm new to Playwright, coming from Cypress, so I might have missed something here.
It seems to me that when intercepting API requests with the page.route()
method, you're not able to specify which http method to intercept?
If it's not possible, I would very much like to see that implemented
Example
I was expecting to see something like:
await page.route('POST', 'my/route', (route) => {
route.fulfill(
{ json },
);
});
Motivation
It would make it possible to write cleaner code.
Am I missing something here? How are we supposed to mock two different request to same URL with different http method