图引擎服务 GES-客户端连接参数

时间:2024-04-18 11:08:22

客户端连接参数

  • Java
    import com.huaweicloud.sdk.core.http.HttpConfig;
    // 使用默认配置
    HttpConfig config = HttpConfig.getDefaultHttpConfig();
    // 默认连接超时时间为60秒,可根据需要调整
    config.withTimeout(60)
    // 根据需要配置是否跳过SSL证书验证
    config.withIgnoreSSLVerification(true);
    // 或者自定义SSLSocketFactory和TrustManager,需要用户自行实现
    config.withSSLSocketFactory(sslSocketFactory).withX509TrustManager(trustManager);
  • Python
    # HttpConfig提供连接参数,可根据需要调整:proxy_protocol, proxy_host, proxy_port, proxy_user, proxy_password, ignore_ssl_verification, ssl_ca_cert, cert_file, key_file, timeout, retry_times, pool_connections, pool_maxsize, allow_redirects
    
    from huaweicloudsdkcore.http.http_config import HttpConfig
    http_conf = HttpConfig(ignore_ssl_verification=True, timeout=60)
support.huaweicloud.com/devg-ges/ges_05_0011.html