Access-Control-Request-Method header
The HTTP Access-Control-Request-Method {{Glossary("request header")}}header is used by browsers when issuing a {{glossary("preflight request")}}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")}}OPTIONS and doesn't use the same method as the actual request.
| Header type | |
|---|---|
| Yes |
Syntax
Access-Control-Request-Method: <method>
Directives
<method>- : An HTTP request method; for example,
{{HTTPMethod("GET")}}GET,{{HTTPMethod("POST")}}POST, or{{HTTPMethod("DELETE")}}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")}}Headers