I'm building a web application with Rust and Nickel.rs. I have a route which submits a form with a POST request.
I would like to be able to use the request data (the data returned from the form), but I'm not sure how to go about it.
// This works and prints 'email=bar&password=foo'
// but how do I get the values separately?
router.post("/login", middleware! { |request, response|
let mut body = String::new();
request.origin.read_to_string(&mut body).unwrap();
format!("{}", body)
});