Access-Control-Request-Method
{{HTTPSidebar}}
The HTTP Access-Control-Request-Method
{{Glossary("request header")}}
is used by browsers when issuing a {{glossary("preflight request")}}
to let the server know which HTTP method will be used when the actual request is made.
This header is necessary because the preflight request is always an {{HTTPMethod("OPTIONS")}}
and doesn’t use the same method as the actual request.
Header type | `{{Glossary("Request header")}}` |
---|---|
`{{Glossary("Forbidden header name")}}` | Yes |
Syntax
Access-Control-Request-Method: <method>
Directives
<method>
- : An HTTP request method; for example,
{{HTTPMethod("GET")}}
,{{HTTPMethod("POST")}}
, or{{HTTPMethod("DELETE")}}
.
- : An HTTP request method; for example,
Examples
Access-Control-Request-Method: POST
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{HTTPHeader("Access-Control-Request-Headers")}}