这是基于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.
 
 
 
 
 
 
feijie 46913253ee feat(docs): 添加webhooks模块文档 1 year ago
..
LINGYUN/Abp/Webhooks upgrade abp framework to 8.2.0 2 years ago
System feat: reset secret to not required 4 years ago
FodyWeavers.xml fix: fix case in reference project paths 4 years ago
FodyWeavers.xsd fix: fix case in reference project paths 4 years ago
LINGYUN.Abp.Webhooks.csproj upgrade abp framework to 8.2.0 2 years ago
README.EN.md feat(docs): 添加webhooks模块文档 1 year ago
README.md feat(docs): 添加webhooks模块文档 1 year ago

README.md

LINGYUN.Abp.Webhooks

Webhook基础模块,提供Webhook的基本定义和功能。

English

功能特性

  • 基本Webhook定义
  • Webhook发布和订阅
  • Webhook事件数据处理
  • Webhook配置管理

模块引用

[DependsOn(typeof(AbpWebhooksModule))]
public class YouProjectModule : AbpModule
{
  // other
}

基本用法

  1. 定义Webhook
public class YourWebhookDefinitionProvider : WebhookDefinitionProvider
{
    public override void Define(IWebhookDefinitionContext context)
    {
        context.Add(
            new WebhookDefinition(
                name: "YourWebhook",
                displayName: L("DisplayName:YourWebhook"),
                description: L("Description:YourWebhook")
            )
        );
    }
}
  1. 发布Webhook
public class YourService
{
    private readonly IWebhookPublisher _webhookPublisher;

    public YourService(IWebhookPublisher webhookPublisher)
    {
        _webhookPublisher = webhookPublisher;
    }

    public async Task PublishWebhook()
    {
        await _webhookPublisher.PublishAsync(
            webhookName: "YourWebhook",
            data: new { /* webhook data */ }
        );
    }
}
  1. 处理Webhook事件
public class YourWebhookHandler : IWebhookHandler, ITransientDependency
{
    public async Task HandleWebhookAsync(WebhookPayload webhook)
    {
        // 处理webhook事件
    }
}