Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import web
- import json
- urls = (
- '/(.*)', 'hello'
- )
- app = web.application(urls, globals())
- class hello:
- def GET(self, name):
- d = {}
- if not name:
- d["name"] = 'World'
- else:
- d["name"] = name
- return json.dumps(d)
- if __name__ == "__main__":
- app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement