From 0c9029404d768a05a412da85e167688f3513e94f Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Mon, 17 Jul 2017 16:10:42 +0800 Subject: [PATCH] add webhook support. --- src/DotNetCore.CAP/CAP.Options.cs | 12 ++++++++++++ src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs diff --git a/src/DotNetCore.CAP/CAP.Options.cs b/src/DotNetCore.CAP/CAP.Options.cs index 850d6dd..334c709 100644 --- a/src/DotNetCore.CAP/CAP.Options.cs +++ b/src/DotNetCore.CAP/CAP.Options.cs @@ -26,6 +26,11 @@ namespace DotNetCore.CAP /// public int PollingDelay { get; set; } = 8; + /// + /// We’ll send a POST request to the URL below with details of any subscribed events. + /// + public WebHook WebHook { get; set; } + /// /// Registers an extension that will be executed when building services. /// @@ -38,4 +43,11 @@ namespace DotNetCore.CAP Extensions.Add(extension); } } + + public class WebHook + { + public string PayloadUrl { get; set; } + + public string Secret { get; set; } + } } \ No newline at end of file diff --git a/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs b/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs new file mode 100644 index 0000000..49039f6 --- /dev/null +++ b/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace DotNetCore.CAP.Infrastructure +{ + class WebHookProvider + { + } +}