Esempio n. 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);
        }
Esempio n. 2
0
 public BandClient(BandClientConfig config)
 {
     _request = new RequestClient(this, config);
 }