Back to Content

Access-Control-Request-Method header

files/en-us/web/http/reference/headers/access-control-request-method/index.md

latest1.1 KB
Original Source

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.

<table class="properties"> <tbody> <tr> <th scope="row">Header type</th> <td>{{Glossary("Request header")}}</td> </tr> <tr> <th scope="row">{{Glossary("Forbidden request header")}}</th> <td>Yes</td> </tr> </tbody> </table>

Syntax

http
Access-Control-Request-Method: <method>

Directives

  • <method>
    • : An HTTP request method; for example, {{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, or {{HTTPMethod("DELETE")}}.

Examples

http
Access-Control-Request-Method: POST

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("Access-Control-Request-Headers")}}