Skip to content

Commit

Permalink
Fix reqwest example
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jul 16, 2017
1 parent b995183 commit b3ce0bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 814,7 @@ fn main() {

// Make a POST request
let client = reqwest::Client::new().unwrap();
let res = client.post("http://httpbin.org/post")
let res = client.post("http://httpbin.org/post").unwrap()
.body("the exact body that is sent")
.send();

Expand All @@ -825,8 825,8 @@ fn main() {

// This will POST a body of `{"lang":"rust","body":"json"}`
let client = reqwest::Client::new().unwrap();
let res = client.post("http://httpbin.org/post")
.json(&map)
let res = client.post("http://httpbin.org/post").unwrap()
.json(&map).unwrap()
.send();
}
```
Expand Down
6 changes: 3 additions & 3 deletions examples/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@ fn main() {

// Make a POST request
let client = reqwest::Client::new().unwrap();
let res = client.post("http://httpbin.org/post")
let res = client.post("http://httpbin.org/post").unwrap()
.body("the exact body that is sent")
.send();

Expand All @@ -29,7 29,7 @@ fn main() {

// This will POST a body of `{"lang":"rust","body":"json"}`
let client = reqwest::Client::new().unwrap();
let res = client.post("http://httpbin.org/post")
.json(&map)
let res = client.post("http://httpbin.org/post").unwrap()
.json(&map).unwrap()
.send();
}

0 comments on commit b3ce0bf

Please sign in to comment.