static private async Task UpdateCloudSearchOAuthHeaderAsync(HttpClient client) { dynamic configuration = ConfigHelper.ReadAppSettings(); string sa = $"{configuration.integration.CloudSearch.serviceAccountEmail}"; string password = $"{configuration.integration.CloudSearch.password}"; await OAuth2HeaderHelper.UpdateCloudSearchOAuthHeaderAsync(client, sa, $"{configuration.integration.CloudSearch.keyFile}", password); }
private static async Task<HttpClient> CreateHttpClientAsync() { dynamic configuration = ConfigHelper.ReadAppSettings(); HttpClient client = new HttpClient(); await OAuth2HeaderHelper.UpdateDocAIOAuthHeaderAsync(client, $"{configuration.integration.DocumentAI.serviceAccountEmail}", $"{configuration.integration.DocumentAI.keyFile}", $"{configuration.integration.DocumentAI.password}"); return client; }
private static async Task <HttpClient> CreateHttpClientAsync() { dynamic configuration = ConfigHelper.ReadAppSettings(); HttpClient client = new HttpClient(); client.Timeout = TimeSpan.FromMinutes(5); await OAuth2HeaderHelper.UpdateCloudSearchOAuthHeaderAsync(client, $"{configuration.integration.CloudSearch.serviceAccountEmail}", $"{configuration.integration.CloudSearch.keyFile}", $"{configuration.integration.CloudSearch.password}"); return(client); }