Updated on 2024-11-25 GMT+08:00

Client Connection Parameters

During client initialization, you can configure HTTP settings as needed.

import com.huaweicloud.sdk.core.http.HttpConfig; 


# Default configuration
http_config = HttpConfig.get_default_config() 

# Timeout configuration
# Set the connection timeout and read timeout to 120 seconds.
http_config.timeout = 120
# Set the connection timeout to 60 seconds and the read timeout to 120 seconds.
http_config.timeout = (60, 120)
 
# SSL configuration: Configure whether to skip SSL certificate verification.
http_config.ignore_ssl_verification = True 

# Configure the server CA certificate so that the SDK can verify the server certificate.
http_config.ssl_ca_cert = '/path/to/certfile'