这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
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

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

  1. Configure Dapr Client
Configure<AbpWebhooksManagementDaprClientOptions>(options =>
{
    options.AppId = "webhooks-management";
    options.HttpEndpoint = "http://localhost:3500";
});
  1. 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" }
        });
    }
}