Accept-Post header
The HTTPAccept-Postresponse header advertises whichmedia types are accepted by the server in aPOST request.For example, a server receiving aPOST request with an unsupported media type could reply with415 Unsupported Media Type and anAccept-Post header referencing one or more supported media types.
The header should appear inOPTIONS requests to a resource that supports thePOST method.AnAccept-Post header in a response to any request method implicitly means that aPOST is allowed on the target resource in the request.
Note:IANA maintainsa list of official content encodings.Thebzip andbzip2 encodings are non-standard but may be used in some cases, particularly for legacy support.
| Header type | Response header |
|---|
In this article
Syntax
Accept-Post: <media-type>/<subtype>Accept-Post: <media-type>/*Accept-Post: */*// Comma-separated list of media typesAccept-Post: <media-type>/<subtype>, <media-type>/<subtype>Note:TheAccept-Post header specifies a media range in the same way asAccept, except that it has no notion of preference viaq (quality values) arguments.This is becauseAccept-Post is a response header whileAccept is a request header.
Directives
<media-type>/<subtype>A single, precisemedia type, like
text/html.<media-type>/*A media type without a subtype.For example,
image/*corresponds toimage/png,image/svg,image/gif, and other image types.*/*Any media type.
Examples
Accept-Post: application/json, text/plainAccept-Post: image/webpAccept-Post: */*Specifications
| Specification |
|---|
| Linked Data Platform> # header-accept-post> |
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-PatchPOSTrequest method