API Testing · Junior · Question 48 of 75
What is an OPTIONS request with Access-Control-Request-Method in the browser?
- 1A CORS preflight asking if the real request is allowed
- 2A request that lists every endpoint of the API
- 3A request that downloads the API documentation
Show the answer
Correct answer: A CORS preflight asking if the real request is allowed
Explanation
For non-simple requests, the browser asks first. If the preflight fails, the real request is never sent.