这是基于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/WebhooksManagement feat(webhooks): added support webhooks. 4 years ago
FodyWeavers.xml feat(webhooks): added support webhooks. 4 years ago
FodyWeavers.xsd feat(webhooks): added support webhooks. 4 years ago
LINGYUN.Abp.WebhooksManagement.HttpApi.Client.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.WebhooksManagement.HttpApi.Client

Webhook管理HTTP API客户端模块,提供对Webhook管理HTTP API的动态代理客户端。

English

功能特性

  • 动态API客户端代理
  • 自动HTTP客户端配置
  • 支持远程服务调用
  • 集成ABP动态C# API客户端

模块引用

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

配置项

{
  "RemoteServices": {
    "WebhooksManagement": {
      "BaseUrl": "http://localhost:44315/"  // Webhook管理服务的基础URL
    }
  }
}

基本用法

  1. 配置远程服务
public override void ConfigureServices(ServiceConfigurationContext context)
{
    var configuration = context.Services.GetConfiguration();
    
    Configure<AbpRemoteServiceOptions>(options =>
    {
        options.RemoteServices.Default = new RemoteServiceConfiguration(
            configuration["RemoteServices:WebhooksManagement:BaseUrl"]);
    });
}
  1. 使用HTTP客户端
public class YourService
{
    private readonly IWebhookSubscriptionAppService _webhookSubscriptionAppService;

    public YourService(IWebhookSubscriptionAppService webhookSubscriptionAppService)
    {
        _webhookSubscriptionAppService = webhookSubscriptionAppService;
    }

    public async Task CallRemoteApi()
    {
        // 创建订阅
        await _webhookSubscriptionAppService.CreateAsync(new WebhookSubscriptionCreateDto
        {
            WebhookUri = "https://your-webhook-endpoint",
            Webhooks = new[] { "YourWebhook" }
        });

        // 查询订阅
        var subscriptions = await _webhookSubscriptionAppService.GetListAsync(
            new WebhookSubscriptionGetListInput());
    }
}