C# Класс CustomSender.WebHooks.MyWebHookSender

This class provide an example of how to customize the shape of custom WebHook requests sent to WebHook subscribers.
Наследование: Microsoft.AspNet.WebHooks.DataflowWebHookSender
Показать файл Открыть проект

Открытые методы

Метод Описание
MyWebHookSender ( ILogger logger ) : System.Net.Http

Защищенные методы

Метод Описание
CreateWebHookRequest ( WebHookWorkItem workItem ) : HttpRequestMessage

By overriding this method you can shape the WebHook request URI exactly as you want, both in terms of HTTP headers and HTTP body.

CreateWebHookRequestBody ( WebHookWorkItem workItem ) : Newtonsoft.Json.Linq.JObject

By overriding this method you can control just the WebHook request body. The rest of the WebHook request follows the default model including the HTTP header containing a signature of the body.

SignWebHookRequest ( WebHookWorkItem workItem, HttpRequestMessage request, Newtonsoft.Json.Linq.JObject body ) : void

By overriding this method you can control just the WebHook header containing a signature of the body.

Описание методов

CreateWebHookRequest() защищенный Метод

By overriding this method you can shape the WebHook request URI exactly as you want, both in terms of HTTP headers and HTTP body.
protected CreateWebHookRequest ( WebHookWorkItem workItem ) : HttpRequestMessage
workItem Microsoft.AspNet.WebHooks.WebHookWorkItem
Результат System.Net.Http.HttpRequestMessage

CreateWebHookRequestBody() защищенный Метод

By overriding this method you can control just the WebHook request body. The rest of the WebHook request follows the default model including the HTTP header containing a signature of the body.
protected CreateWebHookRequestBody ( WebHookWorkItem workItem ) : Newtonsoft.Json.Linq.JObject
workItem Microsoft.AspNet.WebHooks.WebHookWorkItem
Результат Newtonsoft.Json.Linq.JObject

MyWebHookSender() публичный Метод

public MyWebHookSender ( ILogger logger ) : System.Net.Http
logger ILogger
Результат System.Net.Http

SignWebHookRequest() защищенный Метод

By overriding this method you can control just the WebHook header containing a signature of the body.
protected SignWebHookRequest ( WebHookWorkItem workItem, HttpRequestMessage request, Newtonsoft.Json.Linq.JObject body ) : void
workItem Microsoft.AspNet.WebHooks.WebHookWorkItem
request System.Net.Http.HttpRequestMessage
body Newtonsoft.Json.Linq.JObject
Результат void