Trying to redirect before executing rest function.
However, nothing happens. Does it mean that the @before
is not even being executed?
interface IMyAPI
{
void test(string testi);
}
class API : IMyAPI
{
@before!redi("testi")
void test(string testi) { string test = "test complete";}
}
string redi(HTTPServerRequest req, HTTPServerResponse res)
{
res.redirect("http://google.com");
return "teststring";
}