Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HttpHandler(object):
- def __call__(self, request, start_response):
- data = 'Hello, World!\n'
- status = '200 OK'
- response_headers = [
- ('Content-type','text/plain'),
- ('Content-Length', str(len(data)))
- ]
- start_response(status, response_headers)
- return iter([data])
- app = HttpHandler()
Add Comment
Please, Sign In to add comment