Skip to content

Commit c33582c

Browse files
authored
Merge pull request #706 from http-rs/update-surf
Update to latest Surf alpha in tests
2 parents eaad5b6 + 1871e60 commit c33582c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn hello_world() -> Result<(), http_types::Error> {
2525
let client = task::spawn(async move {
2626
task::sleep(Duration::from_millis(100)).await;
2727
let string = surf::get(format!("http://localhost:{}", port))
28-
.body_string("nori".to_string())
28+
.body("nori".to_string())
2929
.recv_string()
3030
.await
3131
.unwrap();
@@ -52,7 +52,7 @@ fn echo_server() -> Result<(), http_types::Error> {
5252
let client = task::spawn(async move {
5353
task::sleep(Duration::from_millis(100)).await;
5454
let string = surf::get(format!("http://localhost:{}", port))
55-
.body_string("chashu".to_string())
55+
.body("chashu".to_string())
5656
.recv_string()
5757
.await
5858
.unwrap();
@@ -88,7 +88,7 @@ fn json() -> Result<(), http_types::Error> {
8888
let client = task::spawn(async move {
8989
task::sleep(Duration::from_millis(100)).await;
9090
let counter: Counter = surf::get(format!("http://localhost:{}", &port))
91-
.body_json(&Counter { count: 0 })?
91+
.body(Body::from_json(&Counter { count: 0 })?)
9292
.recv_json()
9393
.await
9494
.unwrap();

0 commit comments

Comments
 (0)