DocumentRepository.cs
/// <summary>
/// Create an authenticated http client with access token
/// </summary>
/// <returns></returns>
Create an authenticated http client with access token
Create an authenticated http client with access token
private async Task<HttpClient> GetAuthenticatedClient()
        {
            var token = await GetToken();
            var client = new HttpClient();
            client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.access_token}");
            client.DefaultRequestHeaders.Add("Accept", "application/json");
            return client;
        }
private async Task < HttpClient > GetAuthenticatedClient ( ) { var token = await GetToken ( ) ; var client = new HttpClient ( ) ; client . DefaultRequestHeaders . Add ( " " , $" Bearer  { token . access_token } " ) ; client . DefaultRequestHeaders . Add ( " " , " " ) ; return client ; }
Create an authenticated http client with access token
Create an authenticated http client with access token
None