Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A tiny C# HTTP server
C#
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.nuget
src/TinyHttp
tests/TinyHttp.Tests
.gitignore
LICENSE
README.md
TinyHttp.sln

README.md

TinyHttp - a tiny C# HTTP server

Copyright (C) 2012 Matt Jamieson

public class Program : RequestProcessor
{
    public Program()
    {
        Get["/"] = s => new HtmlResponse("<h1>Welcome</h1>");
        Get["/hello/{name}"] = s => new HtmlResponse(String.Format("<h1>Hello, {0}</h1>", s.name));
    }

    public static void Main()
    {
        var host = new TinyHttpHost("http://localhost:9999/", new Program());
        host.Start();

        while (true) ;
    }
}
Something went wrong with that request. Please try again.