Struct edge::Request
[−]
[src]
pub struct Request<'a, 'b: 'a> { /* fields omitted */ }
A request, with a path, query, and fragment (accessor methods not yet implemented for the last two).
Can be queried for the parameters that were matched by the router.
Methods
impl<'a, 'b> Request<'a, 'b>
[src]
fn body(&mut self) -> Result<Vec<u8>>
Reads this request's body until the end, and returns it as a vector of bytes.
Returns an iterator over the cookies of this request.
fn form(&mut self) -> Result<Vec<(String, String)>>
Reads the body of this request, parses it as an application/x-www-form-urlencoded format, and returns it as a vector of (name, value) pairs.
fn params(&self) -> Iter<(String, String)>
Returns the parameters declared by the route that matched the URL of this request.
fn path(&self) -> &Vec<String>
Returns the path of this request, i.e. the list of segments of the URL.
fn query(&self) -> &Option<String>
Returns the query of this request (if any).
fn fragment(&self) -> &Option<String>
Returns the fragment of this request (if any).
Trait Implementations
impl<'a, 'b> Drop for Request<'a, 'b>
[src]
Drop implementation to make sure the body of a request is discarded if nobody reads it.