You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PR #288 the initial check failed because azure_core::TransportPolicy does not implement azure_core::Policy for WASM. Previously this didn't matter because you'd hve to pass in a transport policy to Pipeline::new() and it was only defined as Arc<dyn Policy>; however, with the changes to be more consistent with other languages' SDK, azure_core now creates the TransportPolicy.
As part of #37 we do want to support WASM so we need to figure out the transport story. If/when reqwest supports WASM we could probably just remove #[cfg(not(target_arch = "wasm32"))] from sdk/core/src/policies/transport.rs; otherwise, we may need a WASM-specific transport to use the browser sandbox's network stack.
The text was updated successfully, but these errors were encountered:
I guess we need to figure out why we have - or need to tighten up - the cfg condition above in various places. For example, we currently don't create an implementation of HttpClient for WASM but sounds like we could. We default to reqwest anyway (default feature).
The issue isn't around the usage of reqwest in general. The issue is that reqwest does not support streaming bodies in wasm. For instance, reqwest::Body::wrap_stream is not available in wasm. We need to figure out how we reconcile this.
This is why it might be necessary to not use reqwest for wasm targets so that we can build in streaming support.
rylev
changed the title
Figure out transport story for WASM support
Figure out how to support streaming bodies for WASM target
Jun 16, 2021
In PR #288 the initial check failed because
azure_core::TransportPolicy
does not implementazure_core::Policy
for WASM. Previously this didn't matter because you'd hve to pass in a transport policy toPipeline::new()
and it was only defined asArc<dyn Policy>
; however, with the changes to be more consistent with other languages' SDK, azure_core now creates theTransportPolicy
.As part of #37 we do want to support WASM so we need to figure out the transport story. If/when reqwest supports WASM we could probably just remove
#[cfg(not(target_arch = "wasm32"))]
from sdk/core/src/policies/transport.rs; otherwise, we may need a WASM-specific transport to use the browser sandbox's network stack.The text was updated successfully, but these errors were encountered: