Access-Control-Request-Method
请求头
Access-Control-Request-Method
出现于 preflight request(预检请求)中,用于通知服务器在真正的请求中会采用哪种 HTTP 方法。因为预检请求所使用的方法总是 OPTIONS
,与实际请求所使用的方法不一样,所以这个请求头是必要的。
Header type | Request header |
---|---|
Forbidden header name | yes |
语法
Access-Control-Request-Method: <method>
指令
示例
Access-Control-Request-Method: POST
规范
Specification |
---|
Fetch Standard # http-access-control-request-method |
浏览器兼容性
BCD tables only load in the browser