api_client.py 文件源码

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

项目:databricks-cli 作者: databricks 项目源码 文件源码
def perform_query(self, method, path, data = {}, headers = None):
        """set up connection and perform query"""
        if headers is None:
            headers = self.default_headers

        with warnings.catch_warnings():
            warnings.simplefilter("ignore", exceptions.InsecureRequestWarning)
            resp = self.session.request(method, self.url + path, data = json.dumps(data),
                verify = self.verify, headers = headers)

        try:
            resp.raise_for_status()
        except requests.exceptions.HTTPError, e:
            raise e
        return resp.json()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号