Trait nickel::QueryString [] [src]

pub trait QueryString {
    fn query(&mut self) -> &Query;
}

Required Methods

fn query(&mut self) -> &Query

Extracts URL encoded data from the URL query string.

Examples

#[macro_use] extern crate nickel;
use nickel::{Nickel, HttpRouter, QueryString};

fn main() {
    let mut server = Nickel::new();
    server.get("/a", middleware! { |req, res|
        let query = req.query();
        return res.send(format!("Query: {:?}", query))
    });
}

Implementors