dhanji/sitebricks — pull request #30 by fuzzygroove (2012-05-09 03:46:10+00:00)
Title: Support HTTP 'PATCH' method

Added support for handling the shiny new "PATCH" method.

It's been decreed by the REST gods that PUT should /replace/ an object with the (qualified) contents of the PUT request body, which means the request body has to be sent in full (including unchanged fields) for a proper update. Anything left out is supposed to be removed from the persisted object after the update.

PATCH was introduced to allow partial updates to objects. Endpoints that accept PATCH are expected to only update the fields that are sent in the request, leaving the rest unaltered. It makes for smaller payloads and an easier API. You probably already use PUT to do what PATCH is here to let you do, but now you don't have to.

See: http://tools.ietf.org/html/rfc5789