Created
November 23, 2011 07:53
-
-
Save thecodejunkie/1388141 to your computer and use it in GitHub Desktop.
Extending Nancy to support additional request verbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class CustomRequestVerbsModule : NancyModule | |
{ | |
protected CustomRequestVerbsModule() | |
{ | |
} | |
protected CustomRequestVerbsModule(string modulePath): base(modulePath) | |
{ | |
} | |
public RouteBuilder Trace | |
{ | |
get { return new RouteBuilder("TRACE", this); } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomRequestVerbsTestModule : CustomRequestVerbsModule | |
{ | |
public CustomRequestVerbsTestModule() | |
{ | |
Trace["/"] = _ =>{ | |
return 200; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment