How to use the aliyun-python-sdk-core-v3.aliyunsdkcore.http.protocol_type.HTTP 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_response.py View on Github external
def __init__(
            self,
            host="",
            url="/",
            method="GET",
            headers={},
            protocol=PT.HTTP,
            content=None,
            port=None,
            key_file=None,
            cert_file=None,
            timeout=None):
        HttpRequest.__init__(
            self,
            host=host,
            url=url,
            method=method,
            headers=headers)
        self.__ssl_enable = False
        if protocol is PT.HTTPS:
            self.__ssl_enable = True
        self.__key_file = key_file
        self.__cert_file = cert_file
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / request.py View on Github external
from aliyunsdkcore.acs_exception import error_code
import abc

"""
Acs request model.

Created on 6/15/2015

@author: alex jiang
"""

STYLE_RPC = 'RPC'
STYLE_ROA = 'ROA'
STYLE_OSS = 'OSS'

_default_protocol_type = protocol_type.HTTP

def set_default_protocol_type(user_protocol_type):
    global _default_protocol_type

    if user_protocol_type == protocol_type.HTTP or user_protocol_type == protocol_type.HTTPS:
        _default_protocol_type = user_protocol_type
    else:
        raise exceptions.ClientException(
            error_code.SDK_INVALID_PARAMS, 
            "Invalid 'protocol_type', should be 'http' or 'https'"
        )


def get_default_protocol_type():
    return _default_protocol_type
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / request.py View on Github external
def set_default_protocol_type(user_protocol_type):
    global _default_protocol_type

    if user_protocol_type == protocol_type.HTTP or user_protocol_type == protocol_type.HTTPS:
        _default_protocol_type = user_protocol_type
    else:
        raise exceptions.ClientException(
            error_code.SDK_INVALID_PARAMS, 
            "Invalid 'protocol_type', should be 'http' or 'https'"
        )

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