Struct edge::Request
[−]
[src]
pub struct Request { // some 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 Request
fn body(&self) -> Result<&[u8]>
Returns this request's body as a vector of bytes.
fn cookies(&self) -> Iter<Cookie>
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 method(&self) -> &Method
Returns the method
fn headers(&self) -> &Headers
Returns headers
fn param(&self, key: &str) -> Option<&str>
Returns the parameter with the given name declared by the route that matched the URL of this request (if any).
fn path(&self) -> &[String]
Returns the path of this request, i.e. the list of segments of the URL.
fn query(&self) -> Option<&str>
Returns the query of this request (if any).
fn fragment(&self) -> Option<&str>
Returns the fragment of this request (if any).