Guest User

Untitled

a guest
Jan 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class HttpHandler(object):
  2. def __call__(self, request, start_response):
  3. data = 'Hello, World!\n'
  4. status = '200 OK'
  5. response_headers = [
  6. ('Content-type','text/plain'),
  7. ('Content-Length', str(len(data)))
  8. ]
  9. start_response(status, response_headers)
  10. return iter([data])
  11.  
  12. app = HttpHandler()
Add Comment
Please, Sign In to add comment