Webhook Serialization
Type
Library
Description
using System;
using Microsoft.Extensions.Configuration;
using Deveel.Webhooks;
namespace Example {
public class Startup {
public Startup(IConfiguration config) {
Configuration = config;
}
public IConfiguration Configuration { get; }
public void Configure(IServiceCollection services) {
// ... add any other service you need ...
// this call adds the basic services for sending of webhooks
services.AddWebhookSender<MyWebook>(webhooks => {
webhooks.UseJsonSerializer<MyJsonSerializer>();
webhooks.UseXmlSerializer<MyXmlSerializer>();
});
}
}
}Last updated