From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/http/headers/accept-patch/index.html | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 files/zh-cn/web/http/headers/accept-patch/index.html (limited to 'files/zh-cn/web/http/headers/accept-patch') diff --git a/files/zh-cn/web/http/headers/accept-patch/index.html b/files/zh-cn/web/http/headers/accept-patch/index.html new file mode 100644 index 0000000000..17f3fc0790 --- /dev/null +++ b/files/zh-cn/web/http/headers/accept-patch/index.html @@ -0,0 +1,85 @@ +--- +title: Accept-Patch +slug: Web/HTTP/Headers/Accept-Patch +translation_of: Web/HTTP/Headers/Accept-Patch +--- +
{{HTTPSidebar}}
+ +

服务器使用 HTTP 响应头 Accept-Patch 通知浏览器请求的媒体类型(media-type)可以被服务器理解。

+ +

Accept-Patch in response to any method means that PATCH is allowed on the resource identified by the Request-URI. Two common cases lead to this:

+ +

A server receiving a PATCH request with an unsupported media type could reply with  {{HTTPStatus("415")}} Unsupported Media Type and an Accept-Patch header referencing one or more supported media types.

+ +

 

+ +
Notes: + + +
+ + + + + + + + + + + + +
头部类型{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}(禁止修改的 HTTP 头)yes
+ +

语法

+ +
Accept-Patch: application/example, text/example
+Accept-Patch: text/example;charset=utf-8
+Accept-Patch: application/merge-patch+json
+
+ +

指令

+ +

(无)

+ +

示例

+ +
Accept-Patch: application/example, text/example
+
+Accept-Patch: text/example;charset=utf-8
+
+Accept-Patch: application/merge-patch+json
+
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("5789", "Accept-Patch", "2.2")}}HTTP PATCH
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Accept-Patch")}}

+ +

参见

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