How to use the aliyun-python-sdk-core-v3.aliyunsdkcore.http.format_type function in aliyun-python-sdk-core-v3

To help you get started, we’ve selected a few aliyun-python-sdk-core-v3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / http / http_request.py View on Github external
def set_content(self, content, encoding, format):
        tmp = dict()
        if content is None:
            self.__headers.pop(self.content_md5)
            self.__headers.pop(self.content_length)
            self.__headers.pop(self.content_type)
            self.__content_type = None
            self.__content = None
            self.__encoding = None
            return
        str_md5 = self.md5_sum(content)
        content_length = len(content)
        content_type = format_type.RAW
        if format is not None:
            content_type = format
        self.__headers[self.content_md5] = str_md5
        self.__headers[self.content_length] = content_length
        self.__headers[self.content_type] = content_type
        self.__content = content
        self.__encoding = encoding
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / request.py View on Github external
:param bucket: String
        :param method: String
        :param headers: Dict
        :param uri_pattern: String
        :param path_params: Dict
        :param protocol: String
        :return:
        """
        AcsRequest.__init__(
            self,
            product,
            version,
            action_name,
            location_service_code,
            'openAPI',
            ft.XML,
            protocol,
            method)
        self.__style = STYLE_OSS
        self.__bucket = bucket
        self.__method = method
        self.__header = headers
        self.__uri_pattern = uri_pattern
        self.__path_params = path_params
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / request.py View on Github external
:param action_name: String, mandatory
        :param method: String
        :param headers: Dict
        :param uri_pattern: String
        :param path_params: Dict
        :param protocol: String
        :return:
        """
        AcsRequest.__init__(
            self,
            product,
            version,
            action_name,
            location_service_code,
            location_endpoint_type,
            ft.RAW,
            protocol,
            method)
        self._style = STYLE_ROA
        self._method = method
        if headers:
            self._header = headers
        self._uri_pattern = uri_pattern
        self._path_params = path_params

aliyun-python-sdk-core-v3

The core module of Aliyun Python SDK.

Apache-2.0
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis

Similar packages