This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye/mandaye/response.py

21 lines
583 B
Python

class MandayeResponse(object):
""" Mandaye HTTP Response
"""
def __init__(self, code, status, headers, content):
"""
code: integer return code (200, 302, 404, ..)
status: string with http status (ex: OK, Not Found, ...)
headers: an array with the headers
content: the string with a response content
"""
self.code = code
self.status = status
self.headers = headers
self.content = content
_404 = MandayeResponse(404, 'Not found', [], '')
_502 = MandayeResponse(502, 'Bad Gateway', [], '')