Accept-Patch header
The HTTPAccept-Patchresponse header advertises whichmedia types the server is able to understand in aPATCH request.For example, a server receiving aPATCH request with an unsupported media type could reply with415 Unsupported Media Type and anAccept-Patch header referencing one or more supported media types.
The header should appear inOPTIONS requests to a resource that supports thePATCH method.AnAccept-Patch header in a response to any request method implicitly means that aPATCH is allowed on the target resource in the request.
Note:IANA maintainsa list of official content encodings.Thebzip andbzip2 encodings are non-standard but may be used in some cases, particularly for legacy support.
| Header type | Response header |
|---|
In this article
Syntax
Accept-Patch: <media-type>/<subtype>Accept-Patch: <media-type>/*Accept-Patch: */*// Comma-separated list of media typesAccept-Patch: <media-type>/<subtype>, <media-type>/<subtype>Directives
<media-type>/<subtype>A single, precisemedia type, like
text/html.<media-type>/*A media type without a subtype.For example,
image/*corresponds toimage/png,image/svg,image/gif, and other image types.*/*Any media type.
Examples
Accept-Patch: application/jsonAccept-Patch: application/json, text/plainAccept-Patch: text/plain;charset=utf-8Specifications
| Specification |
|---|
| RFC 5789> # section-3.1> |
Browser compatibility
Browser compatibility is not relevant for this header.The server sends the header, and the specification doesn't define client behavior.
See also
Accept-Post415 Unsupported Media TypePATCHrequest method