kylebarron commented on code in PR #329: URL: https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2049125832
########## src/client/connection.rs: ########## @@ -224,6 +224,60 @@ impl HttpService for reqwest::Client { } } +#[async_trait] +#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] +impl HttpService for reqwest::Client { + async fn call(&self, req: HttpRequest) -> Result<HttpResponse, HttpError> { + let (parts, body) = req.into_parts(); + let url = parts.uri.to_string().parse().unwrap(); + let mut req = reqwest::Request::new(parts.method, url); + *req.headers_mut() = parts.headers; + *req.body_mut() = Some(body.into_reqwest()); + + use futures::{ + channel::{mpsc, oneshot}, + SinkExt, StreamExt, TryStreamExt, + }; + use http_body_util::{Empty, StreamBody}; + use wasm_bindgen_futures::spawn_local; Review Comment: Nit: move imports to the top of this scope? E.g. before the `req.into_parts` line? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org