diff --git a/Cargo.toml b/Cargo.toml index 3fdd82e8ce..7342022629 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ unicase = "2.0" num_cpus = "1.0" pretty_env_logger = "0.1" spmc = "0.2" +url = "1.0" [features] default = ["server-proto"] diff --git a/examples/params.rs b/examples/params.rs new file mode 100644 index 0000000000..86c00cbc5a --- /dev/null +++ b/examples/params.rs @@ -0,0 +1,106 @@ +#![deny(warnings)] +extern crate futures; +extern crate hyper; +extern crate pretty_env_logger; +extern crate url; + +use futures::{Future, Stream}; + +use hyper::{Get, Post, StatusCode}; +use hyper::header::ContentLength; +use hyper::server::{Http, Service, Request, Response}; + +use std::collections::HashMap; +use url::form_urlencoded; + +static INDEX: &[u8] = b"