Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@wshaddix
Last active March 16, 2017 15:36
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 wshaddix/f813a90e40eb552d014d858e93fd146c to your computer and use it in GitHub Desktop.
Save wshaddix/f813a90e40eb552d014d858e93fd146c to your computer and use it in GitHub Desktop.
Sample code snippet
public class RegistrationModule : NancyModule
{
public RegistrationModule() : base("/registrations")
{
Get["/"] = parameters => "List of registrations";
Get["/{id}"] = parameters => "Details of a single registration";
Post["/"] = parameters => "Create a new registration";
Patch["/{id}"] = parameters => "Patch a single registration";
Delete["/{id}"] = parameters => "Delete a single registration";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment