Created
October 23, 2012 06:09
-
-
Save thecodejunkie/3937110 to your computer and use it in GitHub Desktop.
Using the Browser for intra application communication
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
using Nancy; | |
using Nancy.Bootstrapper; | |
using Nancy.Testing; | |
public class Home : NancyModule | |
{ | |
public Home() | |
{ | |
Get["/"] = _ => | |
{ | |
var browser = | |
new Browser(NancyBootstrapperLocator.Bootstrapper); | |
var result = | |
browser.Get("/greet/nancy"); | |
var foo = | |
result.Body.AsString(); | |
return foo; | |
}; | |
Get["/greet/{name}"] = x => | |
{ | |
return string.Concat("Hello, ", x.name); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much .. I will let you know if I have more questions ... Here is the thread for my records https://groups.google.com/forum/#!topic/nancy-web-framework/5SDTMDWssQ0