Cypress · Middle · Question 7 of 77
How do you check the body a form sends to the API?
- 1Intercept it and assert
interception.request.body - 2Check the HTML form values before clicking submit
- 3Read the body from
localStorageafter submitting
Show the answer
Correct answer: Intercept it and assert interception.request.body
Explanation
This catches frontend bugs like wrong field names or types that a stubbed backend would accept silently.