[1] Accept-Patch:
ヘッダーは、
鯖が受け付けるパッチ文書のMIME型を指定するものです。 >>2
[5] Accept-Patch:
ヘッダーは、対象資源において
PATCH
メソッドが使えることを表します >>2。
[6] Accept-Patch:
ヘッダーの値は、
対象資源においてその MIME型によるパッチ文書を使えることを表します >>2。
[7] Accept-Patch:
ヘッダーの値は、1つ以上の
MIME型のリスト (#
) です >>2。
[3] 鯖は、 PATCH
メソッドに対応する資源に対する
OPTIONS
要求への応答に、
Accept-Patch:
ヘッダーを含めるべきです >>2。
[4] 鯖は、PATCH
応答で 415
を返す場合、Accept-Patch
頭欄も含めるべきです。 >>2
[40] 鯖は、 application/json
や application/xml
のような一般的で PATCH
における意味を定義していない
MIME型をパッチ文書として使えると考えるべきではありません >>39。
Accept-Patch: text/example;charset=utf-8
OPTIONS /example/buddies.xml HTTP/1.1 Host: www.example.com [要求]... という要求に対する応答は、
HTTP/1.1 200 OK Allow: GET, PUT, POST, OPTIONS, HEAD, DELETE, PATCH Accept-Patch: application/example, text/example
[10] PATCH
メソッドに対応していることは、
OPTIONS
要求に対する応答に
Allow: PATCH
を含めることでも表明できます >>2。
通常は両者を併用するのが好ましいと思われます。
4.2.7.1 LDP servers that support PATCH must include an Accept-Patch HTTP response header [RFC5789] on HTTP OPTIONS requests, listing patch document media type(s) supported by the server.
The RESTCONF server MUST return the "Accept-Patch" header field in an
OPTIONS response, as specified in [RFC5789], which includes the
media type for YANG Patch. This is needed by a client to determine
the message-encoding formats supported by the server (e.g., XML,
JSON, or both). The following is an example of an "Accept-Patch"
header:
Accept-Patch: application/yang-patch+xml,application/yang-patch+json