Skip to content

Commit

Permalink
Merge pull request #706 from http-rs/update-surf
Browse files Browse the repository at this point in the history
Update to latest Surf alpha in tests
  • Loading branch information
yoshuawuyts authored Sep 26, 2020
2 parents eaad5b6 + 1871e60 commit c33582c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn hello_world() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let string = surf::get(format!("http://localhost:{}", port))
.body_string("nori".to_string())
.body("nori".to_string())
.recv_string()
.await
.unwrap();
Expand All @@ -52,7 +52,7 @@ fn echo_server() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let string = surf::get(format!("http://localhost:{}", port))
.body_string("chashu".to_string())
.body("chashu".to_string())
.recv_string()
.await
.unwrap();
Expand Down Expand Up @@ -88,7 +88,7 @@ fn json() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let counter: Counter = surf::get(format!("http://localhost:{}", &port))
.body_json(&Counter { count: 0 })?
.body(Body::from_json(&Counter { count: 0 })?)
.recv_json()
.await
.unwrap();
Expand Down

0 comments on commit c33582c

Please sign in to comment.