test_twisted.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Tinychat-Bot--Discontinued 作者: Tinychat 项目源码 文件源码
def doRequest(self, service, body=missing, type=pyamf.AMF3, raw=False,
                  decode=True):
        if not raw:
            if body is self.missing:
                body = []
            else:
                body = [body]

            env = remoting.Envelope(type)
            request = remoting.Request(service, body=body)
            env['/1'] = request

            body = remoting.encode(env).getvalue()

        d = self.getPage(body)

        if decode:
            d.addCallback(lambda result: remoting.decode(result))

        return d
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号