cos_client.py 文件源码

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

项目:cos-python-sdk-v5 作者: tencentyun 项目源码 文件源码
def get_auth(self, Method, Bucket, Key='', Expired=300, Headers={}, Params={}):
        """????

        :param Method(string): http method,?'PUT','GET'.
        :param Bucket(string): ?????.
        :param Key(string): ??COS???.
        :param Expired(int): ??????,???s.
        :param headers(dict): ????http headers.
        :param params(dict): ????http params.
        :return (string): ????V5??.
        """
        url = self._conf.uri(bucket=Bucket, path=quote(Key, '/-_.~'))
        r = Request(Method, url, headers=Headers, params=Params)
        auth = CosS3Auth(self._conf._secret_id, self._conf._secret_key, Key, Params, Expired)
        return auth(r).headers['Authorization']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号