File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn hello_world() -> Result<(), http_types::Error> {
25
25
let client = task:: spawn ( async move {
26
26
task:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
27
27
let string = surf:: get ( format ! ( "http://localhost:{}" , port) )
28
- . body_string ( "nori" . to_string ( ) )
28
+ . body ( "nori" . to_string ( ) )
29
29
. recv_string ( )
30
30
. await
31
31
. unwrap ( ) ;
@@ -52,7 +52,7 @@ fn echo_server() -> Result<(), http_types::Error> {
52
52
let client = task:: spawn ( async move {
53
53
task:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
54
54
let string = surf:: get ( format ! ( "http://localhost:{}" , port) )
55
- . body_string ( "chashu" . to_string ( ) )
55
+ . body ( "chashu" . to_string ( ) )
56
56
. recv_string ( )
57
57
. await
58
58
. unwrap ( ) ;
@@ -88,7 +88,7 @@ fn json() -> Result<(), http_types::Error> {
88
88
let client = task:: spawn ( async move {
89
89
task:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
90
90
let counter: Counter = surf:: get ( format ! ( "http://localhost:{}" , & port) )
91
- . body_json ( & Counter { count : 0 } ) ?
91
+ . body ( Body :: from_json ( & Counter { count : 0 } ) ?)
92
92
. recv_json ( )
93
93
. await
94
94
. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments