Requestly
HTTP InterceptorPricingRequestly vs PostmanBlogDocsDownload

Home / HTTP Headers / Accept Patch

Accept Patch

The HTTP Accept-Patch response header informs clients about which media types the server can understand in a PATCH request.
For instance, if a server receives a PATCH request with a media type it does not support, it may respond with a 415 Unsupported Media Type status code and include an Accept-Patch header indicating the supported media types.

The header should be included in OPTIONS requests to resources that permit PATCH method.
An Accept-Patch header in the response to any request type implicitly indicates that using PATCH on the target resource is allowed.

Note:
IANA maintains a list of official content encodings.
Although bzip and bzip2 are non-standard, they might still be used in some cases, especially for legacy support.

Header type Response header
Forbidden request header Yes

Syntax

Accept-Patch: <media-type>/<subtype>
Accept-Patch: <media-type>/*
Accept-Patch: */*

Note: The Accept-Patch header can contain a comma-separated list of media types, such as:
Accept-Patch: <media-type>/<subtype>, <media-type>/<subtype>

Directives

<media-type>/<subtype>

A specific media type specifying both the type and subtype, such as text/html. This precisely indicates the format or data type being used, which helps in content negotiation and proper rendering by browsers or applications.

<media-type>/*

This represents a media type without specifying a subtype. For example, image/* refers broadly to any image format, including image/png, image/svg, and image/gif. It is often used when the specific subtype is not crucial or when multiple subtypes are acceptable for a certain context.

*/*

This denotes any media type, regardless of the specific format or subtype. It is useful when the type of content is flexible, or when the server or client does not specify a preference for particular formats.

Examples

Accept-Patch: application/json
Accept-Patch: application/json, text/plain
Accept-Patch: text/plain;charset=utf-8

Note: Browser compatibility is not relevant for this header. The server sends the header, and the specification doesn’t define client behavior.

How to Modify Header using Requestly

Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Accept-Patch header. This is especially useful for testing how your application handles media types the server accepts in a PATCH request during development or debugging. Steps to Modify the Accept-Patch Header:

  1. Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
  2. Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
  3. Add a new header modification:
    • Under “Action”, select “Add” or “Override”.
    • In the “Header Name” field, enter Accept-Patch.
    • In the “Header Value” field, enter your desired value (e.g., application/json).
  4. Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/\*).
  5. Save the rule.

Once set up, Requestly will inject the Accept-Patch: application/json header into all matching requests, allowing you to test how a client discovers which patch document formats your server supports.

Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.

Download Free →