Accept-Patch

The HTTP Accept-Patch response header is sent by the server to indicate what media types the server can understand in an HTTP PATCH request.

Usage

The HTTP Accept-Patch response header is sent by the server and may be done so as part of a response to any type of HTTP request. It informs the client that HTTP PATCH is allowed on the resource, and provides a list of supported media types.

Syntax

Several Accept-Patch HTTP headers can be used on different lines. Alternatively, a comma-delimited list of media types, optionally with parameters, can be specified on a single line.

Accept-Patch: media-type

If the server receives an HTTP PATCH request for an unsupported media type, it has the option to reply with 415 Unsupported Media Type and provide a list of accepted types in the HTTP response.

Example

In this example, the server responds to a previous HTTP request that was made by the client. As part of it, the HTTP Accept-Patch response header is included.

Response

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

Takeaway

The HTTP Accept-Patch response header is sent by a server to inform clients that the HTTP PATCH method is allowed, as well as what media types are supported.

See also

Last updated: June 2, 2022