Re: "Accept" on 415 responses?

Yes, I think this could be helpful.

I adopted a similar pattern for some internal work a while back that
addressed this problem[1]:

In a nutshell, I added this to options:

-- Typical call to OPTIONS for this URL
REQUEST: **************
OPTIONS /xcs/ugdata/ HTTP/1.1
content-type:text/plain
Host: localhost
Accept: */*

RESPONSE: **************
HTTP/1.1 200 OK
Allow: DELETE,GET,HEAD,OPTIONS,POST,PUT
X-Accept-Types: text/html,text/xml,application/json
X-Content-Types: text/xml,application/x-www-form-urlencoded,application/json

In the running implementation I created, this kind of information is
also returned for 405, 406, and 415

And, yes, the "X-" is earns a sad face<g>.


[1] http://www.amundsen.com/blog/archives/716

mca
http://amundsen.com/blog/
http://twitter.com@mamund
http://mamund.com/foaf.rdf#me




On Mon, Dec 12, 2011 at 16:21, Julian Reschke <julian.reschke@gmx.de> wrote:
>
> Hi there,
>
> see
>
>
> <http://stackoverflow.com/questions/3343165/specify-supported-media-types-when-sending-415-unsupported-media-type>
>
> Should we specify what it means to return an Accept header field in an HTTP *response*?
>
> Best regards, Julian
>

Received on Tuesday, 13 December 2011 01:58:54 UTC