SirwanAfifi / routing_table

A super simple routing table

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The goal of this simple console application is to look at a incoming HTTP request and try to map that request to a method of a C# class:

You can define your routes this way:

var router = new Router();
router.Define(new Dictionary<string, string>
{
    { "/", "HomeController@Index" },
    { "/about", "AboutController@Index" },
    { "/posts", "PostsController@Index" },
    { "/posts/{id}", "PostsController@Details" },
    { "/favicon.ico", "Fav icon" }
});

About

A super simple routing table


Languages

Language:C# 75.1%Language:HTML 24.9%