11//! HTTP Version support and negotiation
2- use bytes:: Bytes ;
32use hyper:: Response ;
43use hyper_util:: rt:: TokioIo ;
54use std:: pin:: Pin ;
@@ -56,17 +55,15 @@ impl HttpVersion {
5655 }
5756}
5857
59- type Http1Sender = hyper:: client:: conn:: http1:: SendRequest < http_body_util :: Full < Bytes > > ;
60- type Http2Sender = hyper:: client:: conn:: http2:: SendRequest < http_body_util :: Full < Bytes > > ;
58+ type Http1Sender = hyper:: client:: conn:: http1:: SendRequest < hyper :: body :: Incoming > ;
59+ type Http2Sender = hyper:: client:: conn:: http2:: SendRequest < hyper :: body :: Incoming > ;
6160
62- type Http1Connection = hyper:: client:: conn:: http1:: Connection <
63- TokioIo < ProxyClientTlsStream > ,
64- http_body_util:: Full < Bytes > ,
65- > ;
61+ type Http1Connection =
62+ hyper:: client:: conn:: http1:: Connection < TokioIo < ProxyClientTlsStream > , hyper:: body:: Incoming > ;
6663
6764type Http2Connection = hyper:: client:: conn:: http2:: Connection <
6865 TokioIo < ProxyClientTlsStream > ,
69- http_body_util :: Full < Bytes > ,
66+ hyper :: body :: Incoming ,
7067 crate :: TokioExecutor ,
7168> ;
7269
@@ -91,9 +88,8 @@ impl From<Http2Sender> for HttpSender {
9188impl HttpSender {
9289 pub async fn send_request (
9390 & mut self ,
94- request : http:: Request < Bytes > ,
91+ request : http:: Request < hyper :: body :: Incoming > ,
9592 ) -> Result < Response < hyper:: body:: Incoming > , hyper:: Error > {
96- let request = request. map ( http_body_util:: Full :: new) ;
9793 match self {
9894 Self :: Http1 ( sender) => sender. send_request ( request) . await ,
9995 Self :: Http2 ( sender) => sender. send_request ( request) . await ,
0 commit comments