aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/status/200
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/status/200
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/status/200')
-rw-r--r--files/zh-cn/web/http/status/200/index.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/status/200/index.html b/files/zh-cn/web/http/status/200/index.html
new file mode 100644
index 0000000000..7567daa62e
--- /dev/null
+++ b/files/zh-cn/web/http/status/200/index.html
@@ -0,0 +1,54 @@
+---
+title: 200 OK
+slug: Web/HTTP/Status/200
+tags:
+ - HTTP
+ - 成功
+ - 状态码
+translation_of: Web/HTTP/Status/200
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>状态码 <strong><code>200 OK</code></strong> 表明请求已经成功. 默认情况下状态码为200的响应可以被缓存。</p>
+
+<p>不同请求方式对于请求成功的意义如下:</p>
+
+<ul>
+ <li>{{HTTPMethod("GET")}}: 已经取得资源,并将资源添加到响应的消息体中。</li>
+ <li>{{HTTPMethod("HEAD")}}: 响应的消息体为头部信息。</li>
+ <li>{{HTTPMethod("POST")}}: 响应的消息体中包含此次请求的结果。</li>
+ <li>{{HTTPMethod("TRACE")}}: 响应的消息体中包含服务器接收到的请求信息。</li>
+</ul>
+
+<p>{{HTTPMethod("PUT")}} 和 {{HTTPMethod("DELETE")}} 的请求成功通常并不是响应<code>200</code> <code>OK</code>的状态码而是 {{HTTPStatus("204")}} <code>No Content</code> 表示无内容(或者  {{HTTPStatus("201")}}  <code>Created</code>表示一个资源首次被创建成功)。</p>
+
+<h2 id="状态码">状态码</h2>
+
+<pre class="syntaxbox">200 OK</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">标题</th>
+ </tr>
+ <tr>
+ <td>{{RFC("7231", "200 OK" , "6.3.1")}}</td>
+ <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">此页中的兼容性表格是从结构化数据生成的。如果您想为数据作出贡献,请移步<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 发起pull request。</p>
+
+<p>{{Compat("http.status.200")}}</p>
+
+<h2 id="相关内容">相关内容</h2>
+
+<ul>
+ <li><a href="/zh-CN/docs/Web/HTTP/Methods">HTTP 请求方法</a></li>
+</ul>