Another possibility is to have another link relation. If we need to
have two ways to do this, this seems simplest.
James M Snell wrote:
A quick and dirty solution would be to augment POST with an Method
header that identifies the actual method the user wishes to perform.
E.g. for delete, it would be
POST /member-uri HTTP/1.1
Host: example.org
Method: DELETE
In the entry you'd have:
<atom:link rel="delete" href="/member-uri/delete"/>
Then you'd do a GET, which is much like a DELETE in that an entity body
is not sent. Certainly a 200 with no content is an acceptable resposne.
for put...
POST /member-uri HTTP/1.1
Host: example.org
Method: PUT
Content-Length: nnnn
Content-Type: application/atom+xml
Here, you'd have an 'update' relation:
<atom:link rel="update" href="/member-uri/update"/>
Then you'd POST the content but as a it is a different URL, the server
"knows" what to do.
This could be described as a compatibility layer and not the preferred
method. As such, it could be "optional". to support.
Certainly, for a client, supporting one is simplest. But, choosing
the right URL amongst a couple different link elements isn't
that hard to implement. And you don't need to set special
headers--which might present problems in certain limited programming
environments.
Woo hoo! We just reinvented SoapAction! Life is good.
Let's not go there... :)
--Alex Milowski