Wednesday, 6 February 2008
Another Kind of HTTP Negotiation
Here’s one that I’ve been wondering about for a while, for the LazyWeb (HTTP Geek Edition);
PUTs and POSTs can result in the creation of new resources, or changes to the state of existing ones. The response to both can contain one of
- a status message about what happened, or
- a representation of the resource (or most important one, if more than one was created/modified); often signalled by the
Content-Location header, or - nothing (i.e., just the status line and headers), usually a
204 No Content.
Usually, a server will just choose which of these is most appropriate, and send it for all such requests. However, I can easily see cases where clients would want to hint to the server what they want back; e.g., a mobile client might prefer nothing, for efficiency, while a publisher might want to get a copy of the article they just submitted back, to make sure that they have any changes to the content locally.
My question is how a client should hint what they want back in such responses, and specifically whether this is purely an application-specific concern (and should therefore be expressed in the request-URI, for example), or is worthy of a standard (thereby better being expressed in a header).
BTW, I don’t think this is a form of content negotiation; that’s about the format of the response, and overloading it for this would produce some problems (e.g., how do you differentiate between an HTML status message and a HTML representation? There are also conflicts with probably resolutions of issue 69).
Filed under: HTTP, Protocol Design, Web, Web Services


25 Comments
Mike Amundsen said:
Wednesday, February 6 2008 at 1:42 AM +10:00
James Snell said:
Wednesday, February 6 2008 at 1:55 AM +10:00
Stefan Eissing said:
Wednesday, February 6 2008 at 2:03 AM +10:00
Mike Amundsen said:
Wednesday, February 6 2008 at 2:30 AM +10:00
Mark Nottingham said:
Wednesday, February 6 2008 at 2:32 AM +10:00
James Snell said:
Wednesday, February 6 2008 at 2:36 AM +10:00
Mark Nottingham said:
Wednesday, February 6 2008 at 2:43 AM +10:00
Mike Amundsen said:
Wednesday, February 6 2008 at 2:58 AM +10:00
duryodhan said:
Wednesday, February 6 2008 at 3:36 AM +10:00
James Snell said:
Wednesday, February 6 2008 at 4:28 AM +10:00
Dimitri Glazkov said:
Wednesday, February 6 2008 at 4:57 AM +10:00
Mike Amundsen said:
Wednesday, February 6 2008 at 5:10 AM +10:00
Mark Nottingham said:
Wednesday, February 6 2008 at 5:13 AM +10:00
Mike Amundsen said:
Wednesday, February 6 2008 at 5:32 AM +10:00
Subbu Allamaraju said:
Wednesday, February 6 2008 at 6:27 AM +10:00
Robert Brewer said:
Wednesday, February 6 2008 at 4:07 PM +10:00
Mike Amundsen said:
Thursday, February 7 2008 at 1:47 AM +10:00
Mark Nottingham said:
Thursday, February 7 2008 at 4:25 AM +10:00
James Snell said:
Thursday, February 7 2008 at 7:42 AM +10:00
Mike Amundsen said:
Thursday, February 7 2008 at 4:25 PM +10:00
James Snell said:
Friday, February 8 2008 at 7:45 AM +10:00
Mark Nottingham said:
Friday, February 8 2008 at 9:15 AM +10:00
Mike Amundsen said:
Sunday, February 10 2008 at 2:24 AM +10:00
Brian Smith said:
Wednesday, February 13 2008 at 6:47 AM +10:00
James Snell said:
Friday, February 15 2008 at 6:06 PM +10:00