KoFi.Client.AspNetCore 0.1.0-dev1

This is a prerelease version of KoFi.Client.AspNetCore.
dotnet add package KoFi.Client.AspNetCore --version 0.1.0-dev1
                    
NuGet\Install-Package KoFi.Client.AspNetCore -Version 0.1.0-dev1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KoFi.Client.AspNetCore" Version="0.1.0-dev1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KoFi.Client.AspNetCore" Version="0.1.0-dev1" />
                    
Directory.Packages.props
<PackageReference Include="KoFi.Client.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KoFi.Client.AspNetCore --version 0.1.0-dev1
                    
#r "nuget: KoFi.Client.AspNetCore, 0.1.0-dev1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KoFi.Client.AspNetCore@0.1.0-dev1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KoFi.Client.AspNetCore&version=0.1.0-dev1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=KoFi.Client.AspNetCore&version=0.1.0-dev1&prerelease
                    
Install as a Cake Tool

KoFi.Client

Modern .NET packages for transport-neutral Ko-fi webhook handling and ASP.NET Core integration.

Packages

  • KoFi.Client
  • KoFi.Client.AspNetCore
  • KoFi.Client.DependencyInjection

What this repo provides

  • transport-neutral Ko-fi webhook parsing and normalization
  • ASP.NET Core endpoint mapping helpers
  • dependency-injection registration helpers
  • an interactive Spectre.Console sample that can expose a local endpoint through Azure Dev Tunnels

Install

dotnet add package KoFi.Client
dotnet add package KoFi.Client.AspNetCore

Add the DI helpers when you want registration extensions:

dotnet add package KoFi.Client.DependencyInjection

Quick start

using KoFi.Client.Webhooks;

KoFiWebhookHandler handler = new();
WebhookHandleResult result = await handler.HandleAsync(request, cancellationToken);

if (result.IsAccepted)
{
    Console.WriteLine("Ko-fi webhook accepted.");
}

ASP.NET Core webhook example

using KoFi.Client.AspNetCore;

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapKoFiWebhook(
    "/webhooks/kofi",
    static (_, _) => Task.FromResult(new KoFiWebhookOptions()),
    static (evt, _, _) =>
    {
        Console.WriteLine(evt.Type);
        return Task.CompletedTask;
    });

await app.RunAsync();

Sample

Run the interactive sample to host a local Ko-fi webhook endpoint and optionally expose it publicly through Azure Dev Tunnels:

dotnet run --project samples/KoFi.Client.Sample

See samples/KoFi.Client.Sample/README.md for the walkthrough.

Development

dotnet test KoFi.Client.slnx
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-dev1 34 3/27/2026