Skip to content

Commit

Permalink
Update WebhooksCore to preview.17 and add HTTP client config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sfmskywalker committed Oct 2, 2024
1 parent bbedd61 commit 108e928
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
3 changes: 2 additions & 1 deletion src/modules/Elsa.Webhooks/Features/WebhooksFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public WebhooksFeature(IModule module) : base(module)
}

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)
Expand Down Expand Up @@ -62,7 +63,7 @@ public override void Configure()
public override void Apply()
{
Services
.AddWebhooksCore()
.AddWebhooksCore(ConfigureHttpClient)
.AddActivityProvider<WebhookEventActivityProvider>();
}
}

0 comments on commit 108e928

Please sign in to comment.