-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or requestreceiverIssue related to the receiving capabilityIssue related to the receiving capability
Description
The current set of ASP.NET Core receivers allows two different types of webhook handlers:
- Handlers registered as services and resolved by a factory/based middleware, that does not accept parameters
- Handlers defined directly in the convention-based middleware as callbacks
We should extend the design to have a convention-based middleware that receive handlers from dependency injection and accepts arguments to configure its execution
Example:
public class Program {
public void ConfigureServices(IServiceCollection services) {
services.AddWebhookReceiver<MyWebhook>()
.AddHandler<MyHandler>();
}
public void Configure(IApplicationBuilder app) {
app.UseWebhookReceiver<MyWebhook>("/webhooks" new WebhookReceiverOptions {
});
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestreceiverIssue related to the receiving capabilityIssue related to the receiving capability