Accept Post
The HTTP Accept-Post response header advertises which media types are accepted by the server in a POST request.
For example, a server receiving a POST request with an unsupported media type could reply with 415 Unsupported Media Type and an Accept-Post header referencing one or more supported media types.
The header should appear in OPTIONS requests to a resource that supports the POST method.
An Accept-Post header in a response to any request method implicitly means that a POST is allowed on the target resource in the request.
Note:
IANA maintains a list of official content encodings.
The bzip and bzip2 encodings are non-standard but may be used in some cases, particularly for legacy support.
| Header type | Response header |
|---|---|
| Forbidden request header | Yes |
Syntax
The Accept-Post header specifies a media range in the same way as Accept, except that it has no notion of preference via q (quality values) arguments. This is because Accept-Post is a response header whereas Accept is a request header. Here are some examples of the syntax:
Accept-Post: <media-type>/<subtype>
Accept-Post: <media-type>/*
Accept-Post: */*
To specify multiple media types, separate them with commas:
Accept-Post: <media-type>/<subtype>, <media-type>/<subtype>
Directives
A media type specifies the nature of the media being transferred. It is written as type/subtype. Here are some common patterns:
<media-type>/<subtype>
This represents a specific media type, such as text/html, indicating plain HTML text.
<media-type>/*
This indicates all subtypes under a media type. For example, image/* includes all image formats like PNG, SVG, GIF, and others.
*/*
This encompasses any media type, used when the exact type is not specified.
Examples
Accept-Post: application/json, text/plain
Accept-Post: image/webp
Accept-Post: */*
Browser compatibility
is not relevant for this header.
The header is sent by the server and the specification does not 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-Post header. This is especially useful for testing how your application handles media types the server accepts in a POST request during development or debugging. Steps to Modify the Accept-Post Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Accept-Post.
- In the “Header Value” field, enter your desired value (e.g., application/json).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/\*).
- Save the rule.
Once set up, Requestly will inject the Accept-Post: application/json header into all matching requests, allowing you to test how a client discovers which formats your server accepts on POST.
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →