ketting icon indicating copy to clipboard operation
ketting copied to clipboard

Adding a `rel='deletes'` link

Open qmachard opened this issue 2 years ago • 2 comments

In some case, a POST or PUT call can delete some resources.

The problem is, when a HTTP method returns a Link header that contains a rel="invalidates", then this can signal a client that the cache for the collection is no longer fresh, but send event to refresh a deleted resources. (cf. #152)

My solution is adding new rel option called deletes.

Link: </foo>; rel="deletes"

When a HTTP method returns a Link header that contains a rel="deletes", then it means that the HTTP request that was recently performed has caused other deleted resources.

qmachard avatar Mar 30 '22 13:03 qmachard

Hi @evert, what do you think about this PR ?

qmachard avatar Jun 08 '22 14:06 qmachard

I forgot to comment on this originally, but probably my only concern is that this is not based on any published or draft standard.

Generally I'm not too concerned introducing my own rels in private projects, but given the more public nature of this one I wonder if it wouldn't be better if we wrote a sort of spec for this somewhere.

The idea is great, and falls right in line with the general architecture and philosophy. Excellent PR as well.

I can be convinced either way though, but curious what you think.

evert avatar Jun 08 '22 21:06 evert