Skip to content

Commit 7153bdd

Browse files
committed
remove send_ methods from Request
1 parent 2d2e112 commit 7153bdd

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/request.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ use crate::trailers::{Trailers, TrailersSender};
1414
use crate::Cookie;
1515
use crate::{Body, Method, TypeMap, Url, Version};
1616

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-
2517
pin_project_lite::pin_project! {
2618
/// An HTTP request.
2719
///
@@ -447,26 +439,6 @@ impl Request {
447439
self.receiver.recv().await
448440
}
449441

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-
470442
/// An iterator visiting all header pairs in arbitrary order.
471443
pub fn iter<'a>(&'a self) -> headers::Iter<'a> {
472444
self.headers.iter()

0 commit comments

Comments
 (0)