We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Having something like mount.mount is extremely awkward.
mount.mount
Something like on might serve better:
on
fn send_hello(req: &mut Request) -> IronResult<Response> { Ok(Response::with(status::Ok, "Hello!")) } fn intercept(req: &mut Request) -> IronResult<Response> { Ok(Response::with(status::Ok, "Blocked!")) } fn main() { let mut mount = Mount::new(); mount.on("/blocked/", intercept).on("/", send_hello); Iron::new(mount).listen(Ipv4Addr(127, 0, 0, 1), 3000); }
The text was updated successfully, but these errors were encountered:
Agreed.
Sorry, something went wrong.
This change is currently in PR in #66, but needs to be rebased over other modernization changes.
No branches or pull requests
Having something like
mount.mount
is extremely awkward.Something like
on
might serve better:The text was updated successfully, but these errors were encountered: