api.py 文件源码

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

项目:ray 作者: felipevolpone 项目源码 文件源码
def to_json(fnc):
    @wraps(fnc)
    def inner(*args, **kwargs):
        bottle_resp.headers['Content-Type'] = 'application/json'
        from_func = fnc(*args, **kwargs)
        if from_func is not None:
            return json.dumps({'result': from_func})
    return inner
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号