-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestUrl2.py
More file actions
34 lines (24 loc) · 796 Bytes
/
Copy pathtestUrl2.py
File metadata and controls
34 lines (24 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class MainPage(webapp.RequestHandler):
def post(self):
self.response.headers['Content-Type'] = 'application/octet-stream'
self.response.out.write(self.request.body)
def put(self):
return self.post();
def delete(self):
self.response.out.write("Hello world");
def options(self):
self.delete()
def trace(self):
self.delete()
def connect(self):
self.delete()
application = webapp.WSGIApplication(
[('/testUrl2', MainPage)],
debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()