In GAE Python, I could use
class MyRequestHandler(webapp.RequestHandler):
def get(self):
pass #Do Something...
def post(self):
pass #Do Something...
To handle GET and POST request. But how can I handle DELETE and PUT? I see delete() and put() in API documentation, but I don’t know how to write a form to simulate DELETE and PUT.
I know in Rails, I can use post method with a hidden field in form to simulate the requests like this:
<input type="hidden" name="_method" value="delete" />
and Rails handles the dirty works automatically.
Is there any similar way to do it in GAE python?
I searched this in Google, but no luck.
Thanks.
You can use the request method which accepts all the methods like get,post,delete and put.
Then you can check it for the request type accordingly.
Check this:
http://gdata-python-client.googlecode.com/svn/trunk/pydocs/gdata.urlfetch.html
you can go through this as well for the put specification.
http://code.google.com/appengine/docs/python/tools/webapp/requesthandlerclass.html#RequestHandler_put