Repository: seanmonstar/reqwest (language: rust)

Issue:
Implement From<http::Request<hyper::Body>> for reqwest::Request
This would allow `http::Request<hyper::Body>` to be used in `Client::execute` which improves interoperability. 

Note that there exists `TryFrom<http::Request<T>> for request::Request` but that requires `T: Into<reqwest::Body>`. This problem presented here could also be solved by implementing `From<hyper::Body> for reqwest::Body`


Discussion / hints:

Fix patch:
diff --git a/src/async_impl/body.rs b/src/async_impl/body.rs
index 5d12d05d9..d469c595e 100644
--- a/src/async_impl/body.rs
+++ b/src/async_impl/body.rs
@@ -161,6 +161,18 @@ impl Body {
     }
 }
 
+impl From<hyper::Body> for Body {
+    #[inline]
+    fn from(body: hyper::Body) -> Body {
+        Self {
+            inner: Inner::Streaming {
+                body: Box::pin(WrapHyper(body)),
+                timeout: None,
+            },
+        }
+    }
+}
+
 impl From<Bytes> for Body {
     #[inline]
     fn from(bytes: Bytes) -> Body {


Test patch: