Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created January 27, 2016 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/c091da78a0127b4bc9f0 to your computer and use it in GitHub Desktop.
Save dcomartin/c091da78a0127b4bc9f0 to your computer and use it in GitHub Desktop.
public class NancyDemoModule : NancyModule
{
public NancyDemoModule(IResourceLinker linker)
{
Get["HelloWorldRoute", "/nancy/demo/{MyQueryParameter:string}"] =
parameters => new[] {"Hello", "World", (string) parameters.MyQueryParameter};
Get["FindHelloWorld", "/nancy/findhelloworld"] = parameters => new[]
{
linker.BuildAbsoluteUri(Context, "HelloWorldRoute", new {MyQueryParameter = "CodeOpinion"})
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment