You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Cro::HTTP::Router;
use Cro::HTTP::Server;
sub my-route() {
route {
post -> *@a {
content 'text/plain', 'foo';
}
}
}
my $app = route {
get {
content 'text/plain', 'root';
}
include foo => my-route();
};
my Cro::Service $s = Cro::HTTP::Server.new(:host<localhost>, :port<7798>, application => $app);
$s.start;
react whenever signal(SIGINT) { $s.stop; exit; }
a GET to /foo correctly returns a 405 whereas with /foo/foo it returns 404, however if the get route is removed then it will return 405 for a GET to all /foo/**.
It's entirely possible that it's simply my expectations need adjusting or I missed an important part of the documentation or something.
The text was updated successfully, but these errors were encountered:
With something like:
a GET to /foo correctly returns a 405 whereas with /foo/foo it returns 404, however if the
get
route is removed then it will return 405 for a GET to all /foo/**.It's entirely possible that it's simply my expectations need adjusting or I missed an important part of the documentation or something.
The text was updated successfully, but these errors were encountered: