Re: PUT and DELETE methods in 200 code

<snip>
> The tricky question is: how does the server know that a PUT was the result
> of a form submission?
</snip>

Why would this be of interest to the server?

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


#RESTFest 2010
http://rest-fest.googlecode.com




On Mon, Apr 4, 2011 at 12:17, Julian Reschke <julian.reschke@gmx.de> wrote:
> On 04.04.2011 18:08, Cameron Heavon-Jones wrote:
>>
>> Since PUT and DELETE responses are non-cachable, the default behaviour to
>> avoid protocol inefficiencies should be to return no content - unless the
>> client has specifically requested content.
>>
>> A html representation is a valid response body for PUT and DELETE,
>> especially if it was the format of request generation as is the case from
>> forms. It need not be a full representation of the resource, which would be
>> overkill for an operation over that representation, but should be a
>> formatted response to the request - WebDAV has chosen plain text to
>> represent this.
>
> ...WebDAV (the spec) hasn't chosen any specific format.
>
> The tricky question is: how does the server know that a PUT was the result
> of a form submission?
>
> Checking the content type appears to be fragile; in particular if later on
> we want to extend the set of types.
>
>> ...
>
> BR, Julian
>

Received on Monday, 4 April 2011 16:21:25 UTC