- From: Julian Reschke <julian.reschke@gmx.de>
- Date: Tue, 05 Apr 2011 16:14:18 +0200
- To: Cameron Heavon-Jones <cmhjones@gmail.com>
- CC: mike amundsen <mamund@yahoo.com>, public-html@w3.org
On 05.04.2011 15:55, Cameron Heavon-Jones wrote: > ... > Ok, so the Accept header can only be used to define the format of the response. > > But isn't it the server's responsibility to define the content for each format? Why can a server not have the following mapping? > > PUT /user/123 > > Accept: text/plain -> "User created" > Accept: application/xml -> <xml><user id="123"/></xml> > Accept: application/json -> {id:123} > Accept: text/html -> <html>...</html> > ... Yes. But what do you return in the case of text/html? A status message? An HTML representation of the resource? An HTML representation of a form that can *edit* the resource? The media type just doesn't tell you that. Best regards, Julian
Received on Tuesday, 5 April 2011 14:14:52 UTC