_http_client.py 文件源码

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

项目:firebase-admin-python 作者: firebase 项目源码 文件源码
def request(self, method, url, **kwargs):
        """Makes an HTTP call using the Python requests library.

        This is the sole entry point to the requests library. All other helper methods in this
        class call this method to send HTTP requests out. Refer to
        http://docs.python-requests.org/en/master/api/ for more information on supported options
        and features.

        Args:
          method: HTTP method name as a string (e.g. get, post).
          url: URL of the remote endpoint.
          kwargs: An additional set of keyword arguments to be passed into the requests API
              (e.g. json, params).

        Returns:
          Response: An HTTP response object.

        Raises:
          RequestException: Any requests exceptions encountered while making the HTTP call.
        """
        resp = self._session.request(method, self._base_url + url, **kwargs)
        resp.raise_for_status()
        return resp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号