Skip to content

Instantly share code, notes, and snippets.

@thecodejunkie
Created October 23, 2012 06:09
Show Gist options
  • Save thecodejunkie/3937110 to your computer and use it in GitHub Desktop.
Save thecodejunkie/3937110 to your computer and use it in GitHub Desktop.
Using the Browser for intra application communication
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);
};
}
}
@erjjones
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment