You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.6 KiB
1.6 KiB
LINGYUN.Abp.WebhooksManagement.Dapr.Client
Webhook management Dapr client integration module that provides integration with Dapr service invocation building block.
Features
- Support for accessing webhook management service through Dapr service invocation
- Seamless integration with Dapr service invocation building block
- Support for distributed service invocation
Module Dependencies
[DependsOn(typeof(AbpWebhooksManagementDaprClientModule))]
public class YouProjectModule : AbpModule
{
// other
}
Configuration
{
"WebhooksManagement": {
"Dapr": {
"AppId": "webhooks-management", // Dapr application ID for webhook management service
"HttpEndpoint": "http://localhost:3500" // Dapr sidecar HTTP endpoint
}
}
}
Basic Usage
- Configure Dapr Client
Configure<AbpWebhooksManagementDaprClientOptions>(options =>
{
options.AppId = "webhooks-management";
options.HttpEndpoint = "http://localhost:3500";
});
- Use Webhook Management Client
public class YourService
{
private readonly IWebhookSubscriptionAppService _webhookSubscriptionAppService;
public YourService(IWebhookSubscriptionAppService webhookSubscriptionAppService)
{
_webhookSubscriptionAppService = webhookSubscriptionAppService;
}
public async Task SubscribeWebhook()
{
await _webhookSubscriptionAppService.SubscribeAsync(new WebhookSubscriptionCreateDto
{
WebhookUri = "https://your-webhook-endpoint",
Webhooks = new[] { "YourWebhook" }
});
}
}