跳转到主要内容

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 {{Glossary("[Request header")}}header](https://developer.mozilla.org/en-US/docs/Glossary/Request%20header)
{{Glossary("[Forbidden request header")}}header](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden%20request%20header) Yes

Syntax

Access-Control-Request-Method: <method>

Directives

Examples

Access-Control-Request-Method: POST

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also