Skip to content
ADP
API Design PrincipleBETA

[ADP-146] Accept-Post

This is a response only header.

Guidance

  • MAY use Accept-Post to tell the client it's not supported to POST with the requesting MIME type(Content-Type). SHOULD return 415 at this case.

  • SHOULD NOT response Accept-Post or status 415 if the client is POSTing without using Content-Type in the request header.

    http
    POST /resources
    Content-Type: image/jpeg
    
    {
        "name": "example"
    }
    
    HTTP/1.1 415 Unsupported Media Type
    Accept-Post: application/json

    TIP

    💡 There's use case for a LDP server should response OPTIONS with Accept-Post. See https://www.w3.org/TR/ldp/; but we don't cover it in the API design.

    http
    GET /resources
    
    Accept-Post: application/json, image/jpeg

Reference