示例#1
0
        public RequestClient(BandClient client, BandClientConfig config)
        {
            _client = client;

            _httpClient = new HttpClient
            {
                BaseAddress = new Uri(BaseUrl)
            };

            _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {config.Token}");

            _semaphore = new SemaphoreSlim(1);
        }
示例#2
0
 public BandClient(BandClientConfig config)
 {
     _request = new RequestClient(this, config);
 }