aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/access-control-request-method/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/access-control-request-method/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/access-control-request-method/index.html')
-rw-r--r--files/zh-cn/web/http/headers/access-control-request-method/index.html69
1 files changed, 69 insertions, 0 deletions
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
+---
+<div>{{HTTPSidebar}}</div>
+
+<div>请求头  <strong><code>Access-Control-Request-Method </code></strong>出现于 {{glossary("preflight request")}} (预检请求)中,用于通知服务器在真正的请求中会采用哪种  <a href="https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods">HTTP 方法</a>。因为预检请求所使用的方法总是 {{HTTPMethod("OPTIONS")}} ,与实际请求所使用的方法不一样,所以这个请求头是必要的。</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Header type</th>
+ <td>{{Glossary("Request header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}</th>
+ <td>yes</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">Access-Control-Request-Method: &lt;method&gt;
+</pre>
+
+<h2 id="指令">指令</h2>
+
+<dl>
+ <dt>&lt;method&gt;</dt>
+ <dd>一种 <a href="/en-US/docs/Web/HTTP/Methods">HTTP请求方法 </a>, 例如 {{HTTPMethod("GET")}}、{{HTTPMethod("POST")}} 或 {{HTTPMethod("DELETE")}}。</dd>
+</dl>
+
+<h2 id="示例">示例</h2>
+
+<pre>Access-Control-Request-Method: POST</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Fetch','#http-access-control-request-method', 'Access-Control-Request-Method')}}</td>
+ <td>{{Spec2("Fetch")}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("http.headers.Access-Control-Request-Method")}}</p>
+
+<h2 id="相关内容">相关内容</h2>
+
+<ul>
+ <li>{{HTTPHeader("Access-Control-Request-Headers")}}</li>
+</ul>