1
1
use super :: { body:: IncomingBody , Body , Error , Request , Response , Result } ;
2
- use crate :: http:: request:: into_outgoing ;
3
- use crate :: http:: response:: try_from_incoming_response ;
2
+ use crate :: http:: request:: try_into_outgoing ;
3
+ use crate :: http:: response:: try_from_incoming ;
4
4
use crate :: io:: { self , AsyncOutputStream , AsyncPollable } ;
5
5
use crate :: time:: Duration ;
6
6
use wasi:: http:: types:: { OutgoingBody , RequestOptions as WasiRequestOptions } ;
@@ -20,7 +20,7 @@ impl Client {
20
20
21
21
/// Send an HTTP request.
22
22
pub async fn send < B : Body > ( & self , req : Request < B > ) -> Result < Response < IncomingBody > > {
23
- let ( wasi_req, body) = into_outgoing ( req) ?;
23
+ let ( wasi_req, body) = try_into_outgoing ( req) ?;
24
24
let wasi_body = wasi_req. body ( ) . unwrap ( ) ;
25
25
let body_stream = wasi_body. write ( ) . unwrap ( ) ;
26
26
@@ -41,7 +41,7 @@ impl Client {
41
41
// is to trap if we try and get the response more than once. The final
42
42
// `?` is to raise the actual error if there is one.
43
43
let res = res. get ( ) . unwrap ( ) . unwrap ( ) ?;
44
- try_from_incoming_response ( res)
44
+ try_from_incoming ( res)
45
45
}
46
46
47
47
/// Set timeout on connecting to HTTP server
0 commit comments