I'm looking to make use of HTTP PATCH to update a single field in a record (distinguishing this from PUT which should update the entire record). However it appears that post_vars (which I plan to hold the updated fields) does not get parsed in the request object due to this line in parse_post_vars in gluon/globals.py:
and env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH')):
request.post_vars is intended to be a dictionary-like object (derived from form data or JSON), but a patch document need not be. For example, if you send a patch of type
application/json-patch+json as described here, the resulting Python object would be a list.
Because the format of patch documents is flexible, you should handle parsing and applying them on your own. You can always read the patch document directly via