Skip to content

Commit

Permalink
fix(readme): Make the README client example work
Browse files Browse the repository at this point in the history
`res` needs to be unwrapped, we want to print out `body`, and `res` doesn't need to be mutable.
  • Loading branch information
xymostech committed Feb 6, 2015
1 parent c2784bc commit 9b5d6aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ fn main() {
let mut client = Client::new();

// Creating an outgoing request.
let mut res = client.get("http://www.gooogle.com/")
let res = client.get("http://www.gooogle.com/")
// set a header
.header(Connection(vec![Close]))
// let 'er go!
.send();
.send().unwrap();

// Read the Response.
let body = res.read_to_string().unwrap();

println!("Response: {}", res);
println!("Response: {}", body);
}
```

Expand Down

0 comments on commit 9b5d6aa

Please sign in to comment.