Accept-Post Header

Table of Content

The Accept-Post header is a crucial aspect in HTTP protocol, which mainly communicates the media types a server accepts from client through HTTP POST method. It allows the server to determine the format of the client's data, optimizes server's process of handling requests and helps prevent incompatible data formats.

Syntax

Accept-Post: text/plain, application/xhtml+xml

Directives

Accept-Post header usually include media types which the resource supports in HTTP POST method. Each media types is separated by a comma (,). The declaration of specific subtype is done using a slash (/).

Examples

Here are some examples of the Accept-Post header usage:

// The server can accept plain text or html/xhtml in http post request body from the client
Accept-Post: text/plain, application/xhtml+xml

// The server only accepts json format in http post request body from the client
Accept-Post: application/json

Browser Compatibility

Browser Compatibility
Chrome Not Supported
Firefox Not Supported
Safari Not Supported
Opera Not Supported
Edge Not Supported

Please note that the Accept-Post Header is not currently supported by any of the mainstream web browsers.

How to modify Accept-Post header

ModHeader is a Chrome extension that allows you to modify and manipulate HTTP request headers. It may not be possible to modify the Accept-Post header using ModHeader in browsers due to security reasons.

However, to modify a header in ModHeader, you'd typically:

  1. Click the ModHeader icon to open the extension.
  2. Type the name of the header in the 'Name' text box and type its value in the 'Value' text box, for instance:
    • Enter Accept-Post in the 'Name' section.
    • Enter application/json in the 'Value' section.
  3. Remember to enable the entry using the checkbox on the left side.

Please take into account that the changes will apply to all websites until you disable the rule or remove the header from ModHeader. For Accept-Post, use this feature for development and debugging only, as browsers do not support this header.