add timeouts

This commit is contained in:
2024-01-14 21:44:12 +00:00
parent c8294cf317
commit f56ef8703c
3 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ public class AlbyApi
public AlbyApi(HttpClient client, Config config)
{
_client = client;
_client.Timeout = TimeSpan.FromSeconds(60);
_client.BaseAddress = new("https://api.getalby.com");
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(config.Alby.Type, config.Alby.Token);
}