Open ikai104 opened 2 months ago
Maybe docs is needed for things like this too: https://users.rust-lang.org/t/from-hyper-legacy-client-to-reqwest-0-12-how-to-handle-stream-upload-put-and-stream-download-get-from-s3/112520/2.
@frederikhors your other URLO-topic is also somewhat related:
I tried
reqwest::Body::wrap_stream
with bothaxum::Body::into_data_stream
andhttp_body_util::BodyStream
, both failed becauseaxum::body::Body
is notSync
.
BodyDataStream
with reqwest's Body
type:By using
SyncWrapper
we can avoid requiringSync
for the stream passed toBody::wrap_stream
. This makes it easier to use streams like axum'sBodyDataStream
.
I think it was indeed just an accident that the Sync
bound was reintroduced in #2059, at least that is how I interpret https://github.com/seanmonstar/reqwest/pull/2229#issuecomment-2029663514
Sync
bound inBody::wrap_stream()
had removed since #2088 (v0.11.24) but it back again at v0.12.0.I can't found any document for it so maybe just an accident?