From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../access-control-request-method/index.html | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 files/zh-cn/web/http/headers/access-control-request-method/index.html (limited to 'files/zh-cn/web/http/headers/access-control-request-method/index.html') diff --git a/files/zh-cn/web/http/headers/access-control-request-method/index.html b/files/zh-cn/web/http/headers/access-control-request-method/index.html new file mode 100644 index 0000000000..92af190729 --- /dev/null +++ b/files/zh-cn/web/http/headers/access-control-request-method/index.html @@ -0,0 +1,69 @@ +--- +title: Access-Control-Request-Method +slug: Web/HTTP/Headers/Access-Control-Request-Method +tags: + - 请求首部 + - 跨域资源共享 +translation_of: Web/HTTP/Headers/Access-Control-Request-Method +--- +
{{HTTPSidebar}}
+ +
请求头  Access-Control-Request-Method 出现于 {{glossary("preflight request")}} (预检请求)中,用于通知服务器在真正的请求中会采用哪种  HTTP 方法。因为预检请求所使用的方法总是 {{HTTPMethod("OPTIONS")}} ,与实际请求所使用的方法不一样,所以这个请求头是必要的。
+ + + + + + + + + + + + +
Header type{{Glossary("Request header")}}
{{Glossary("Forbidden header name")}}yes
+ +

语法

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

指令

+ +
+
<method>
+
一种 HTTP请求方法 , 例如 {{HTTPMethod("GET")}}、{{HTTPMethod("POST")}} 或 {{HTTPMethod("DELETE")}}。
+
+ +

示例

+ +
Access-Control-Request-Method: POST
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Fetch','#http-access-control-request-method', 'Access-Control-Request-Method')}}{{Spec2("Fetch")}}Initial definition.
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Access-Control-Request-Method")}}

+ +

相关内容

+ + -- cgit v1.2.3-54-g00ecf