Merge pull request #121 from jkleint/patch-1

Fix client example so it compiles
This commit is contained in:
Jonathan Reem
2014-11-16 00:31:57 -08:00

View File

@@ -46,17 +46,17 @@ Client:
```rust
fn main() {
// Creating an outgoing request.
let mut req = Request::get(Url::parse("http://www.gooogle.com/")).unwrap();
let mut req = Request::get(Url::parse("http://www.gooogle.com/").unwrap()).unwrap();
// Setting a header.
req.headers_mut().set(Foo);
req.headers_mut().set(Connection(vec![Close]));
// Start the Request, writing headers and starting streaming.
let res = req.start().unwrap()
// Send the Request.
.send().unwrap()
// Read the Response.
.read_to_string().unwrap()
.read_to_string().unwrap();
println!("Response: {}", res);
}