Nancy redirect to route under the current module
nancy
Solution
You can use named routes and Nancy.Linker. See https://github.com/horsdal/Nancy.Linker
That is install `Nancy.Linker` from NuGet, take a dependency on `IResourceLinker` and change the code to:
public class YourModule
{
public YourModule(IResourceLinker linker)
{
Get["theRoute", "/there"] = ...
Get["/here"] = Response.AsRedirect(linker.BuildAbsoluteUri(this.Context, "theRoute");
}
{
Problem
I need to redirect to a path under the current module: ``` modulePath = "/test"; Get["/there"] = ... Get["/here"] = routeParams => { return ????????????("/there"); } ``` I expect "/test/here" to redirect to "/test/there"