C# Class CustomSender.WebHooks.MyWebHookSender

This class provide an example of how to customize the shape of custom WebHook requests sent to WebHook subscribers.
Inheritance: Microsoft.AspNet.WebHooks.DataflowWebHookSender
Afficher le fichier Open project: aspnet/WebHooks

Méthodes publiques

Méthode Description
MyWebHookSender ( ILogger logger ) : System.Net.Http

Méthodes protégées

Méthode Description
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.

Method Details

CreateWebHookRequest() protected méthode

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
Résultat System.Net.Http.HttpRequestMessage

CreateWebHookRequestBody() protected méthode

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
Résultat Newtonsoft.Json.Linq.JObject

MyWebHookSender() public méthode

public MyWebHookSender ( ILogger logger ) : System.Net.Http
logger ILogger
Résultat System.Net.Http

SignWebHookRequest() protected méthode

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
Résultat void