我有
class Auth(webapp.RequestHandler):
def get(self,username,password):
self.response.out.write("auth" + self.request.get("username"))
我的网址结构为:
/api/auth/?username=xxxx&password=xxxx
如何在处理程序脚本中映射此URL?
答案 0 :(得分:4)
处理程序:
class Auth(webapp.RequestHandler):
def get(self):
self.response.out.write("username" + self.request.get("username"))
self.response.out.write("password" + self.request.get("password"))
<强> URL:强>
/api/auth?username=xxxx&password=xxxx
<强>应用强>
application = webapp.WSGIApplication([
('/api/auth', Auth),
], debug=True)