1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Headers

  1. Accept-Patch
    1. Usage in responses
      1. Writing responses (servers)
      2. Reading responses (clients)
    2. Overview table
    3. Syntax

Accept-Patch

The Accept-Patch header specifies which patch media types the server accepts for use in a PATCH request.

Usage in responses

Unlike the Accept header, but more like the Allow header, this is a response header that specifies what a client may use in a request.

Writing responses (servers)

Servers send Accept-Patch to the client in 415 Unsupported Media Type responses, especially to PATCH requests. The header could also be sent in response to OPTIONS.

The server should first ensure the resource exists, that the user-agent has the proper credentials to make the request, and any other checks that can be performed without needing to know the exact details of the request-body.

If the server receives a request from a client with a Content-Encoding value that it does not understand, send 415 Unsupported Media Type with an Accept-Patch header listing the content codings the server can accept from clients.

The 415 Unsupported Media Type status can be used for other purposes (e.g. an invalid Content-Type), do not supply this header in these other cases.

Reading responses (clients)

Clients use this header to select a media type to use when making a PATCH request.

Clients should make a request with their favored media type first, then if the server does not support, see the PATCH method for more information.

In cases where Clients may also read this header from a response to an OPTIONS request, if it was not present in responses to other methods.

This header is advisory, clients should always be prepared to retry a PATCH request in the case the allowable media types changes between requests.

Overview table

Name
Accept-Patch
Description
Specifies which media types are acceptable to send in a PATCH request.
Direction
Response
Advertises
Content-Type
Specification
RFC 5789: PATCH Method for HTTP ยง3.1. Accept-Patch

Syntax

Accept-Patch = 1#media-type