Struct iron::request::HttpRequest
[-] [+]
[src]
pub struct HttpRequest<'a, 'b> where 'b: 'a {
pub remote_addr: SocketAddr,
pub method: Method,
pub headers: Headers,
pub uri: RequestUri,
pub version: HttpVersion,
// some fields omitted
}
A request bundles several parts of an incoming NetworkStream
, given to a Handler
.
Fields
Methods
impl<'a, 'b> Request<'a, 'b> where 'b: 'a
fn new(stream: &'a mut BufReader<&'b mut NetworkStream + 'static>, addr: SocketAddr) -> Result<Request<'a, 'b>, Error>
Create a new Request, reading the StartLine and Headers so they are immediately useful.
fn deconstruct(self) -> (SocketAddr, Method, Headers, RequestUri, HttpVersion, HttpReader<&'a mut BufReader<&'b mut NetworkStream + 'static>>)
Deconstruct a Request into its constituent parts.