def __init__(self): status = status = HTTP_STATUS_CODES[406] headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json' } HTTPError.__init__(self, status, headers, self.message)
def __init__(self, url, status='303 See Other'): """ Returns a `status` redirect to the new URL. `url` is joined with the base URL so that things like `redirect("about") will work properly. """ newloc = urlparse.urljoin(web.ctx.path, url) newloc = ctx.homedomain + newloc headers = { 'Content-Type': 'text/html', 'Location': newloc } HTTPError.__init__(self, status, headers, "")
def __init__(self): status = "201 Created" headers = {'Content-Type': 'application/json'} HTTPError.__init__(self, status, headers, self.message)
def __init__(self): status = "403 Forbidden" headers = {'Content-Type': 'application/json'} HTTPError.__init__(self, status, headers, self.message)
def __init__(self): status = "401 Unauthorized" headers = {'Content-type': 'application/json'} HTTPError.__init__(self, status, headers, self.message)
def __init__(self): status = "401 Bad Request" headers = {'Content-type': 'application/json'} HTTPError.__init__(self, status, headers, self.message)
def __init__(self, message=None): status = "405 Method Not Allowed" headers = { "Content-Type": "application/json; charset=UTF-8" } HTTPError.__init__(self, status, headers, jsonEncode(message or self.message))
def __init__(self, status, message=None): headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, message or self.message)
def __init__(self, message=None): status = "405 Method Not Allowed" headers = {"Content-Type": "application/json; charset=UTF-8"} HTTPError.__init__(self, status, headers, encodeJson(message or self.message))
def __init__(self, message=None): status = "403 Forbidden" headers = { "Content-Type": "application/json; charset=UTF-8" } HTTPError.__init__(self, status, headers, encodeJson(message or self.message))
def __init__(self, message=None): status = "400 Bad Request" headers = { "Content-Type": "application/json; charset=UTF-8" } HTTPError.__init__(self, status, headers, jsonEncode(message or self.message))
def __init__(self, log_message=None): HTTPError.__init__(self, 400, log_message)
def __init__(self, message): status = '500 Internal Server Error' headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, message)
def __init__(self, message): status = '500 Internal Server Error' headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, message)
def __init__(self, log_message=None): HTTPError.__init__(self, 400, log_message)