Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace NancyConNegDemo
- {
- using Extensions;
- using Models;
- using Nancy;
- public class ConNegModule : NancyModule
- {
- public ConNegModule() : base("/conneg")
- {
- Get["/"] = x =>
- {
- var model = new UserModel(Context.Items["username"].ToString());
- I.RespondTo(ContentTypes.Html).WithView("MyView")
- .RespondTo(ContentTypes.Xml)
- .RespondTo(ContentTypes.Json)
- .UsingModel(model);
- };
- }
- }
- }
Add Comment
Please, Sign In to add comment