client.py 文件源码

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

项目:python-http-client 作者: sendgrid 项目源码 文件源码
def _make_request(self, opener, request):
        """Make the API call and return the response. This is separated into
           it's own function, so we can mock it easily for testing.

        :param opener:
        :type opener:
        :param request: url payload to request
        :type request: urllib.Request object
        :return: urllib response
        """
        try:
            return opener.open(request)
        except HTTPError as err:
            exc = handle_error(err)
            exc.__cause__ = None
            raise exc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号