Junior REST API

What is the role of the OPTIONS HTTP method in RESTful APIs?

  • Used for CORS preflight requests.
  • Tells the client which HTTP methods and headers are allowed.

👉 Example Response:

Allow: GET, POST, PUT, DELETE

Access-Control-Allow-Origin: *

More from ASP.NET Core Web API Tutorial

All questions for this course