conftest.py 文件源码

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

项目:camisole 作者: prologin 项目源码 文件源码
def msgpack_request(http_client):
    default_client = http_client

    async def call(url, data=None, client=None, accept='*/*'):
        if not client:
            client = default_client
        method = client.post if data is not None else client.get
        resp = await method(
            url,
            data=msgpack.dumps(data, use_bin_type=True),
            headers={'content-type': 'application/msgpack', 'accept': accept})
        return await http_response_decode(resp)

    return call
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号