ketting
ketting copied to clipboard
Adding a `rel='deletes'` link
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.
Hi @evert, what do you think about this PR ?
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.