Пример #1
0
 private async Task GetUsers(TokenResult token)
 {
     SetAccessToken(token);
     var response = await _helper.ClientHelper.GetAsync("/v1/user_load");
     if (response.StatusCode != HttpStatusCode.OK)
     {
         Console.WriteLine(response.StatusCode);
     }
     Console.WriteLine(await response.Content.ReadAsStringAsync());
     Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
 }
Пример #2
0
 private void SetAccessToken(TokenResult token)
 {
     _helper.ClientHelper.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",
         token.AccessToken);
 }