Access-Control-Request-Method 请求标头会由浏览器在发出preflight request时使用,通知服务器在实际请求中发出时将会采用哪种 HTTP 方法。此标头是必需的,因为预检请求总是采用 OPTIONS 方法,这与实际请求所使用的方法并不相同。
<table class="properties"> <tbody> <tr> <th scope="row">标头类型</th> <td>Request header</td> </tr> <tr> <th scope="row">Forbidden header name</th> <td>是</td> </tr> </tbody> </table>
语法
Access-Control-Request-Method: <method>
指令
- <method>
- : 一种 HTTP 请求方法,例如 GET、POST 或 DELETE。
示例
Access-Control-Request-Method: POST
规范
浏览器兼容性
参见
- Access-Control-Request-Headers
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
