Routing handler for the Iron web framework. First version based on Router project trying to keep all of its features and add Mount functionality.
Mount only works with predefined strings and cannot be used like django's router to strip matched part of query for further handlers.
Usually routers restrict developer to specifiy method. Mountrouter enforces REST ideology: you first identify resource using path and then perform action based on method. MethodPicker struct allows developer to specify handler for http methods.
If you're using cargo, just add router to your Cargo.toml
.
[dependencies]
iron-mountrouter = { git = "https://github.com/SlNPacifist/iron-mountrouter", version = "*" }
Then in your main.rs
extern crate iron_mountrouter;
use iron_mountrouter::{Router, MethodPicker};
Otherwise, cargo build
, and the rlib will be in your target
directory.