a guest Jan 21st, 2019 56 Never
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-Length', str(len(data)))
- start_response(status, response_headers)
- return iter([data])
- app = HttpHandler()
RAW Paste Data