Update WebhooksCore to preview.17 and add HTTP client config

Upgraded WebhooksCore package version from 0.0.1-preview.16 to 0.0.1-preview.17. Introduced a new configurable HTTP client action in the WebhooksFeature class to support extended configurations.
This commit is contained in:
Sipke Schoorstra 2024-10-02 20:53:21 +02:00
parent bbedd61138
commit 108e928335
2 changed files with 3 additions and 2 deletions

View file

@ -100,7 +100,7 @@
<PackageVersion Include="Testcontainers.Redis" Version="3.9.0" />
<PackageVersion Include="Testcontainers.PostgreSql" Version="3.9.0" />
<PackageVersion Include="ThrottleDebounce" Version="2.0.0" />
<PackageVersion Include="WebhooksCore" Version="0.0.1-preview.16" />
<PackageVersion Include="WebhooksCore" Version="0.0.1-preview.17" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.0" />

View file

@ -18,6 +18,7 @@ public class WebhooksFeature : FeatureBase
}
public Action<IOptions<WebhookSinksOptions>> ConfigureSinks { get; set; } = options => { };
public Action<IHttpClientBuilder> ConfigureHttpClient { get; set; } = builder => { };
/// Registers the specified webhook with <see cref="WebhookSinksOptions"/>
public WebhooksFeature RegisterWebhookSink(Uri endpoint)
@ -62,7 +63,7 @@ public class WebhooksFeature : FeatureBase
public override void Apply()
{
Services
.AddWebhooksCore()
.AddWebhooksCore(ConfigureHttpClient)
.AddActivityProvider<WebhookEventActivityProvider>();
}
}