public static void Init(HttpClientConfig config, QCloudCredentialProvider credentialsProvider)
 {
     lock (sync)
     {
         HttpClient.config = config;
         HttpClient.credentialsProvider = credentialsProvider;
         // init grobal httpwebreqeust
         CommandTask.Init(HttpClient.config);
     }
 }
Beispiel #2
0
        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);
     }
 }
Beispiel #4
0
 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);
             }
         }
     }
 }