Yllibed.HttpServer
1.0.0-dev.13
See the version list below for details.
dotnet add package Yllibed.HttpServer --version 1.0.0-dev.13
NuGet\Install-Package Yllibed.HttpServer -Version 1.0.0-dev.13
<PackageReference Include="Yllibed.HttpServer" Version="1.0.0-dev.13" />
<PackageVersion Include="Yllibed.HttpServer" Version="1.0.0-dev.13" />
<PackageReference Include="Yllibed.HttpServer" />
paket add Yllibed.HttpServer --version 1.0.0-dev.13
#r "nuget: Yllibed.HttpServer, 1.0.0-dev.13"
#:package Yllibed.HttpServer@1.0.0-dev.13
#addin nuget:?package=Yllibed.HttpServer&version=1.0.0-dev.13&prerelease
#tool nuget:?package=Yllibed.HttpServer&version=1.0.0-dev.13&prerelease
Yllibed Http Server
A versatile, lightweight HTTP server for .NET applications. Self-contained with no dependencies on ASP.NET or other frameworks.
Quick Start
// Recommended: Use dynamic port assignment
var server = new Server(); // Port 0 by default - no conflicts!
server.RegisterHandler(new StaticHandler("/", "text/plain", "Hello, world!"));
var (uri4, uri6) = server.Start();
Console.WriteLine($"Server running at: {uri4}");
Or with a fixed port:
var server = new Server(8080);
server.RegisterHandler(new StaticHandler("/", "text/plain", "Hello, world!"));
var (uri4, uri6) = server.Start();
Common Use Cases
- OAuth2 return URL endpoints
- Remote diagnostics/monitoring
- IoT device configuration interfaces
- Simple REST API endpoints
Configuration
Dynamic Port Assignment (Recommended): Using port 0
automatically assigns an available port, preventing conflicts—perfect for testing, microservices, and team development.
// ✅ Recommended approach
var server = new Server(); // Dynamic port
var (uri4, uri6) = server.Start();
var actualPort = new Uri(uri4).Port; // Get the assigned port
For advanced configuration, use ServerOptions
:
var serverOptions = new ServerOptions
{
Port = 0, // Dynamic port (recommended)
Hostname4 = "127.0.0.1",
Hostname6 = "::1",
BindAddress4 = IPAddress.Any // Listen on all interfaces
};
var server = new Server(serverOptions);
Dependency Injection
Works with Microsoft.Extensions.DependencyInjection:
// Option 1: Extension method (cleanest) - uses dynamic ports by default
services.AddYllibedHttpServer(); // Zero configuration, no conflicts!
// Or configure explicitly:
services.AddYllibedHttpServer(opts =>
{
opts.Port = 0; // Dynamic port (recommended)
opts.Hostname4 = "127.0.0.1";
});
// Option 2: Configure + AddSingleton
services.Configure<ServerOptions>(opts => { opts.Port = 0; });
services.AddSingleton<Server>(); // Auto-selects IOptions<> constructor
Limitations
- HTTP/1.1 only (no HTTP/2+ or WebSockets)
- No HTTPS/TLS support
- Designed for small-scale applications
For more examples and advanced usage, visit the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging (>= 9.0.0)
- PolySharp (>= 1.15.0)
- System.Collections.Immutable (>= 9.0.0)
- System.ValueTuple (>= 4.5.0)
-
net8.0
- Microsoft.Extensions.Logging (>= 9.0.0)
- PolySharp (>= 1.15.0)
-
net9.0
- Microsoft.Extensions.Logging (>= 9.0.0)
- PolySharp (>= 1.15.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Yllibed.HttpServer:
Package | Downloads |
---|---|
Yllibed.HttpServer.Json
JSON adapter for Yllibed.HttpServer using Newtonsoft.Json |
|
Yllibed.HttpServer.Nancy
NancyFx adapter for Yllibed Versatile Http Server |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-dev.24 | 51 | 9/6/2025 |
1.0.0-dev.21 | 53 | 9/6/2025 |
1.0.0-dev.17 | 46 | 9/6/2025 |
1.0.0-dev.16 | 49 | 9/6/2025 |
1.0.0-dev.13 | 80 | 9/5/2025 |
1.0.0-dev.11 | 127 | 4/30/2025 |
1.0.0-dev.10.ge2ac37743f | 79 | 11/24/2024 |
1.0.0-dev.8.gf43e0359cb | 75 | 11/24/2024 |
1.0.0-dev.7.g14d4754916 | 78 | 11/24/2024 |
1.0.0-dev.6.g4ad889b55a | 74 | 11/24/2024 |
1.0.0-dev.3.ga376bac550 | 74 | 11/24/2024 |
0.9.1 | 2,959 | 5/31/2017 |
0.9.0 | 1,585 | 5/31/2017 |