Language: C#
Nancy
Get["/"] = x => { return "This is the root"; }; Get["/Greet"] = x => { return "Hello World"; }; Get["/Greet/{name}"] = x => { return "Hello " + x.name; }; Get["/404"] = x => { return 404; }; Get["/json"] = x => { var p = new Foo { Age = 122, Name = "Bar" }; return new JsonResult<Foo>(p); }; Get["/navigation/{path}/show/title={name}"] = x => { return "Complex route was macthed with path : " + x.path + " and title : " + x.name; };
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

