Rest Web Service with App Engine and Webapp
        Posted  
        
            by fceruti
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by fceruti
        
        
        
        Published on 2010-03-28T23:06:30Z
        Indexed on 
            2010/03/28
            23:13 UTC
        
        
        Read the original article
        Hit count: 437
        
I want to build a REST web service on app engine. Currently i have this:
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
class UsersHandler(webapp.RequestHandler):  
def get(self, name):
    self.response.out.write('Hello '+ name+'!') 
def main():
util.run_wsgi_app(application)
#Map url like /rest/users/johnsmith
application = webapp.WSGIApplication([(r'/rest/users/(.*)',UsersHandler)]                                      
                                   debug=True)
if __name__ == '__main__':
    main()
And i would like to retreive for example all my users when the path /rest/users is accessed. I Imagine I can do this by building another handler, but I want to know if is possible to do it inside of this handler.
© Stack Overflow or respective owner