# Accept-Post header

The HTTP **`Accept-Post`** [response header](https://developer.mozilla.org/en-US/docs/Glossary/response%20header) advertises which [media types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types) are accepted by the server in a [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request.
For example, a server receiving a `POST` request with an unsupported media type could reply with [415 Unsupported Media Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415) and an `Accept-Post` header referencing one or more supported media types.

The header should appear in [OPTIONS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/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](https://www.iana.org/assignments/http-parameters#content-coding).
> The `bzip` and `bzip2` encodings are non-standard but may be used in some cases, particularly for legacy support.

<table class="properties">
  <tbody>
    <tr>
      <th scope="row">Header type</th>
      <td>[Response header](https://developer.mozilla.org/en-US/docs/Glossary/Response%20header)</td>
    </tr>
  </tbody>
</table>

## Syntax

```http
Accept-Post: <media-type>/<subtype>
Accept-Post: <media-type>/*
Accept-Post: */*

// Comma-separated list of media types
Accept-Post: <media-type>/<subtype>, <media-type>/<subtype>
```

> **NOTE:**
> The `Accept-Post` header specifies a media range in the same way as [Accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept), except that it has no notion of preference via `q` ([quality values](https://developer.mozilla.org/en-US/docs/Glossary/quality%20values)) arguments.
> This is because `Accept-Post` is a response header while `Accept` is a request header.

## Directives

- `<media-type>/<subtype>`
  - : A single, precise [media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types), like `text/html`.
- `<media-type>/*`
  - : A media type without a subtype.
    For example, `image/*` corresponds to `image/png`, `image/svg`, `image/gif`, and other image types.
- `*/*`
  - : Any media type.

## Examples

```http
Accept-Post: application/json, text/plain
Accept-Post: image/webp
Accept-Post: */*
```

## Specifications

## Browser compatibility

Browser compatibility is not relevant for this header.
The header is sent by the server and the specification does not define client behavior.

## See also

- [Accept-Patch](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Patch)
- [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request method
