diff --git a/src/async_impl/body.rs b/src/async_impl/body.rs index a70a853b1..32105edf7 100644 --- a/src/async_impl/body.rs +++ b/src/async_impl/body.rs @@ -137,8 +137,20 @@ impl Body { } } - // pub? - pub(crate) fn streaming(inner: B) -> Body + /// Wrap a [`HttpBody`] in a box inside `Body`. + /// + /// # Example + /// + /// ``` + /// # use reqwest::Body; + /// # use futures_util; + /// # fn main() { + /// let content = "hello,world!".to_string(); + /// + /// let body = Body::streaming(content); + /// # } + /// ``` + pub fn streaming(inner: B) -> Body where B: HttpBody + Send + Sync + 'static, B::Data: Into,