see --> self.request.method
def get(self):
logging.info("::::::::::::" + self.request.method)
self.response.out.write('get')
def post(self):
logging.info("::::::::::::" + self.request.method)
self.response.out.write('post')
def put(self):
logging.info("::::::::::::" + self.request.method)
self.response.out.write('put')
def delete(self):
logging.info("::::::::::::" + self.request.method)
self.response.out.write('delete')
On Aug 28, 2:48 am, Jiang <[EMAIL PROTECTED]> wrote:
> HiDavide,
>
> Thanks for your reply but i still get the problem. For example, i have
> a simple class:
>
> class SimpleService(RequestHandler):
> def get(self):
> self.response.headers['Content-Type'] = 'text/plain'
> self.response.out.write('get')
>
> def post(self):
> self.response.headers['Content-Type'] = 'text/plain'
> self.response.out.write('post')
>
> def put(self):
> self.response.headers['Content-Type'] = 'text/plain'
> self.response.out.write('put')
>
> def delete(self):
> self.response.headers['Content-Type'] = 'text/plain'
> self.response.out.write('delete')
>
> Every time i try "PUT" and "DELETE", it will be routed to the get
> method automatically. So i am not sure where the problem is.
>
> Thanks
>
> On Aug 28, 5:46 am,DavideRognoni<[EMAIL PROTECTED]> wrote:
>
> > Hi Jiang,
> > see this
> > linkhttp://code.google.com/appengine/docs/webapp/requesthandlerclass.html
>
> > get()
> > post()
> > put()
> > head()
> > delete()
>
> > On Aug 27, 10:22 am, Jiang <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I have a quick question: does app engine support form "PUT" and
> > > "DELETE"?
>
> > > They are covered in online doc. I have tried all of them but every
> > > time i make a request, it will be transferred to the "GET" method
> > > automatically.
>
> > > So could anyone here helps me that how to get "put" and "delete"
> > > calls?
>
> > > Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---