Created
September 20, 2012 14:00
-
-
Save carcer/3756103 to your computer and use it in GitHub Desktop.
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
// /api/wut | |
public GetGuidesModule() | |
: base("/api") | |
{ | |
Get["/wut"] = p => | |
{ | |
return "Hello"; | |
}; | |
} |
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
// /api/export/something | |
public class GetGuidesModule : NancyModule | |
{ | |
public GetGuidesModule() | |
: base("/api") | |
{ | |
Get["/export/{type}"] = p => | |
{ | |
return "Hello " + p.type; | |
}; | |
} | |
} |
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
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/events-api/,~/api/" /> | |
.... | |
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="api/*" /> |
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
// /api/anything-here | |
public class GetGuidesModule : NancyModule | |
{ | |
public GetGuidesModule() | |
: base("/api") | |
{ | |
Get["/{type}"] = p => | |
{ | |
return "Hello " + p.type; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment