I have a RESTful web service which exposes a resource that enables you (the logged in user) to like or unlike a blog post. My question is: what is the RESTfully correct way to express this resource?
My first stab looks like:
PUT /likes/<blog_entry_id> # marks this blog entry as liked DELETE /likes/<blog_entry_id> # marks this blog entry as not liked This semantic is at least consistent with the idempotency requirements of PUT and DELETE (i.e. repeated calls to PUT have no effect unless interspersed with DELETEs, and vice versa).
Is there a more conventional design for the management of a boolean HTTP resource?