Re: [PR] Support `object_store` with wasm: Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]
tustvold commented on PR #329: URL: https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2818622563 Thank you for this, looks good to me :+1: -- 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
Re: [PR] Support `object_store` with wasm: Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]
tustvold merged PR #329: URL: https://github.com/apache/arrow-rs-object-store/pull/329 -- 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
Re: [PR] Support `object_store` with wasm: Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]
alamb commented on PR #329: URL: https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2813970378 Thanks again everyone. From my perspective this PR is ready to merge but I want to leave it open for another day or two to allow more time for comments. I'll be away next week so if another committer doesn't merge it before I'll merge it when I get back -- 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
Re: [PR] Support `object_store` with wasm: Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]
H-Plus-Time commented on code in PR #329: URL: https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2049147577 ## 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 { +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: Ah, yep - I must have started from a copy-paste of the non-wasm impl, I'll move them. -- 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
Re: [PR] Support `object_store` with wasm: Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]
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 { +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