Re: partial updates to same url?
Jan Algermissen <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <[email protected]> |
On Oct 14, 2012, at 12:49 AM, Colin Taylor wrote:
> Hi, I need to do a partial update so I'm POSTing with Etag of whole resource as precondition, i.e I'm POSTing to same URL as the resource. It feels like I should be doing it to a sub URL though, but how do I reconcile that with sending the Etag?
Interesting question.
I am not sure POST goes with Conditional update. Need to check the spec.
Meanwhile - can you use PATCH?
You'd need to roll your own little patch media type. Would be interesting if you shared your use case.
PATCH /contract/42
If-Match: "3"
Content-Type: application/contract-update
<contract-update>
<set-status>platinum</set-status>
</contract-update>
200 Ok
ETag: "4"
Content-Type: application/contract
<contract>
<name>Bert</name>
<status>platinum</status>
</contract>
Jan
>
>
> cheers
> Colin
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rest-discuss/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/rest-discuss/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/