PATCH method handler on Google AppEngine WebApp2
问题 I tried to use a def patch(): method in my webapp2.RequestHandler to support partial resource updates, but then saw that the allowed methods are frozen in webapp2.py: allowed_methods = frozenset(('GET', 'POST', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE')) How can I extend webapp2.RequestHandler or modify the WSGIApplication class to allow the PATCH HTTP method when deployed on Google AppEngine? 回答1: Just use a monkey patch by performing this before creating a WSGIApplication : allowed