public static void Init(HttpClientConfig config, QCloudCredentialProvider credentialsProvider) { lock (sync) { HttpClient.config = config; HttpClient.credentialsProvider = credentialsProvider; // init grobal httpwebreqeust CommandTask.Init(HttpClient.config); } }
public HttpClient(HttpClientConfig config) { if (config != null) { this.config = config; } else { this.config = new HttpClientConfig.Builder().Build(); } // init grobal httpwebreqeust CommandTask.Init(this.config); }
public static void Init(HttpClientConfig config, QCloudCredentialProvider credentialsProvider) { lock (sync) { if (config == null) { throw new CosClientException((int)CosClientError.INVALID_ARGUMENT, "HttpClientConfig = null"); } HttpClient.config = config; HttpClient.credentialsProvider = credentialsProvider; // init grobal httpwebreqeust CommandTask.Init(HttpClient.config); } }
public void Init(HttpClientConfig config) { if (this.config == null) { lock (sync) { if (this.config == null) { this.config = config; // init grobal httpwebreqeust CommandTask.Init(this.config); } } } }