Parses URI Templates into a friendly object structure.
Simply cast a string to UriTemplateString
.
public class PeopleModule : Nancy.Routing.UriTemplates.UriTemplateModule
{
public PeopleModule()
{
// by default you'll be creating typical routes
Get("person/{id}", p => GetModel(p.id));
// and URI Templates are opt-in
using(Templates)
{
Get("people{;include}{/page}{?name}", p => GetPeople(p.include, p.page, p.name));
}
}
}
The stencil print icon by Dairy Free Design from The Noun Project