@@ -14,14 +14,6 @@ use crate::trailers::{Trailers, TrailersSender};
14
14
use crate :: Cookie ;
15
15
use crate :: { Body , Method , TypeMap , Url , Version } ;
16
16
17
- cfg_unstable ! {
18
- use std:: future:: Future ;
19
-
20
- use crate :: { Client , Error , Response , Server } ;
21
-
22
- type BoxFuture <' a, T > = Pin <Box <dyn Future <Output = T > + ' a + Send >>;
23
- }
24
-
25
17
pin_project_lite:: pin_project! {
26
18
/// An HTTP request.
27
19
///
@@ -447,26 +439,6 @@ impl Request {
447
439
self . receiver . recv ( ) . await
448
440
}
449
441
450
- /// Send a request directly to a server.
451
- ///
452
- /// This is useful for sending a request to a server without needing to
453
- /// make any further HTTP requests. Examples include: HTTP endpoints in
454
- /// frameworks, or testing logic for requests.
455
- #[ cfg( feature = "unstable" ) ]
456
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
457
- pub fn send_to < S : Server > ( self , server : & S ) -> BoxFuture < ' static , Result < Response , Error > > {
458
- server. recv_req ( self )
459
- }
460
-
461
- /// Send a request through a client.
462
- ///
463
- /// This will most likely create an HTTP request over the network.
464
- #[ cfg( feature = "unstable" ) ]
465
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
466
- pub fn send_from < C : Client > ( self , client : & C ) -> BoxFuture < ' static , Result < Response , Error > > {
467
- client. send_req ( self )
468
- }
469
-
470
442
/// An iterator visiting all header pairs in arbitrary order.
471
443
pub fn iter < ' a > ( & ' a self ) -> headers:: Iter < ' a > {
472
444
self . headers . iter ( )
0 commit comments