Re: partial updates to same url?

"Moore, Jonathan (CIM)" <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
On Oct 13, 2012, at 7:56 PM, "mike amundsen" <[email protected]> wrote:
> the URL helps
> - not confuse the original URL (/blog-posts/{id}) with the partial update

What confusion are you trying to avoid? Do you mean where the original would normally support POST (append) and PATCH? Typically I've seen "overloaded POST" include a hidden input with, say _method=PATCH to disambiguate. 

> of course this means the caches are out-of-date, but using the ETag limits that problem to only caches that don't honor the ETag.

A POST to the same URL doesn't have that problem. If we are logically PATCHing the root URL I prefer to direct the POST there, precisely for the visibility it affords caches. Even with Etags, if you have an actual max-age or Expires, you won't see an update until the entry goes stale if it's not invalidated*. Technically correct; max-age=60 means you can treat that response as the correct one for the next 60 seconds. But if you miss the opportunity to invalidate a client/browser cache, the user will likely be surprised by this "correct" behavior. 

Jon

* or until the client tries a conditional update with the stale Etag and gets a 412, for example.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.