Accept-Post

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

Usage

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

Syntax

Several Accept-Post 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-Post: media-type

If the server receives an HTTP POST 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-Post response header is included.

Response

HTTP/1.1 200 OK
Accept-Post: application/example, text/example
Accept-Post: image/webp
Accept-Post: */*

Takeaway

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

See also

Last updated: June 2, 2022