11use 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 ;
44use crate :: io:: { self , AsyncOutputStream , AsyncPollable } ;
55use crate :: time:: Duration ;
66use wasi:: http:: types:: { OutgoingBody , RequestOptions as WasiRequestOptions } ;
@@ -20,7 +20,7 @@ impl Client {
2020
2121 /// Send an HTTP request.
2222 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) ?;
2424 let wasi_body = wasi_req. body ( ) . unwrap ( ) ;
2525 let body_stream = wasi_body. write ( ) . unwrap ( ) ;
2626
@@ -41,7 +41,7 @@ impl Client {
4141 // is to trap if we try and get the response more than once. The final
4242 // `?` is to raise the actual error if there is one.
4343 let res = res. get ( ) . unwrap ( ) . unwrap ( ) ?;
44- try_from_incoming_response ( res)
44+ try_from_incoming ( res)
4545 }
4646
4747 /// Set timeout on connecting to HTTP server
0 commit comments