request.py 文件源码

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

项目:bdocker 作者: indigo-dc 项目源码 文件源码
def execute_post(self, path, parameters):
        """Execute POST request.

        This method execute a POST request on the endpoint.

        :param path: path of the request
        :param parameters: parameters to include in the request
        :return: json response
        """
        try:
            body = make_body(parameters)
            req = self._get_req(path, content_type="application/json",
                                body=body, method="POST")
            response = req.get_response()
        except Exception as e:
            response = webob.Response(status=500, body=str(e))
        json_response = self._get_from_response(response)
        return json_response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号