Sending Requests with Intercept? #9314
-
I am looking to use the new intercept command with the news of server and route being deprecated. I am not sure if this is the right command to use going forward. This is my existing code... This is just an api call. Something that you would be able to send with postman. Would I use the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The The new |
Beta Was this translation helpful? Give feedback.
The
cy.request
command is NOT deprecated. You should use it to make your own API calls, like you are doing it. Additional reading: https://example.cypress.io/commands/network-requests#request and https://www.cypress.io/blog/2017/11/07/add-gui-to-your-e2e-api-tests/The new
cy.intercept
command replacescy.server + cy.route
commands only