Why would you use the OPTIONS method and how does it relate to CORS preflight requests?

Last updated 29 June 2026

  • OPTIONS is a safe, idempotent request asking which methods a resource supports (server replies with an Allow header).

  • Browsers send it automatically as a CORS preflight before non-simple cross-origin requests (custom headers, PUT/DELETE, certain content types). The real request is sent only if the server's Access-Control-Allow-* headers approve.

  • Preflight results can be cached via Access-Control-Max-Age to avoid repeated probes.

  • https://www.freecodecamp.org/news/become-a-full-stack-developer-and-get-a-job/
  • https://www.geeksforgeeks.org/node-js/http-access-control-cors/
  • https://saiparvathaneni.medium.com/enhancing-your-flask-api-implementing-options-handling-requests-limits-and-retries-3462a3ab833b
  • https://siranju-jugi.medium.com/cors-preflight-requests-and-http-401-795822792d7f
All REST API interview questions