本文整理汇总了Python中aspen.Response.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Response.__init__方法的具体用法?Python Response.__init__怎么用?Python Response.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aspen.Response
的用法示例。
在下文中一共展示了Response.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, *args):
Response.__init__(self, 400, self.msg.format(*args))
示例2: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, code, lazy_body, **kw):
Response.__init__(self, code, '', **kw)
self.lazy_body = lazy_body
示例3: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, extension):
body = "Failure to typecast extension '{0}'".format(extension)
Response.__init__(self, code=404, body=body)
示例4: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, *args, **kw):
Response.__init__(self, 400, '', **kw)
self.lazy_body = self.msg
self.args = args
示例5: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, code=400, lazy_body=None, **kw):
Response.__init__(self, code, '', **kw)
if lazy_body:
self.lazy_body = lazy_body
示例6: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, *args, **kw):
Response.__init__(self, 403, '', **kw)
示例7: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self):
Response.__init__(self, code=400, body="Possible CRLF Injection detected.")
示例8: __init__
# 需要导入模块: from aspen import Response [as 别名]
# 或者: from aspen.Response import __init__ [as 别名]
def __init__(self, ctype):
Response.__init__(self, code=415, body="Unknown body Content-Type: %s" % ctype)