graphqlview.py 文件源码

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

项目:flask-graphql 作者: graphql-python 项目源码 文件源码
def parse_body(self):
        # We use mimetype here since we don't need the other
        # information provided by content_type
        content_type = request.mimetype
        if content_type == 'application/graphql':
            return {'query': request.data.decode('utf8')}

        elif content_type == 'application/json':
            return load_json_body(request.data.decode('utf8'))

        elif content_type in ('application/x-www-form-urlencoded', 'multipart/form-data'):
            return request.form

        return {}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号