How do I read an Iron Request in both middleware and the handler?
问题 I'm working on a small API in Rust and am not sure how to access a Request from Iron in two places. The Authentication middleware reads the Request once for a token and the actual route tries to read it again if the path is allowed (currently there is no check). This gives me an EOF error as the request has already been read. I can't seem to easily clone the request and I believe it must be mutable in order to read the body. extern crate iron; extern crate router; extern crate rustc_serialize