From 00e3294ac1b00ba6cfcafe3e423c1090aac3f140 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Wed, 7 Oct 2020 22:54:31 -0700 Subject: [PATCH] Remove convenience methods for CONNECT verb. (#177) CONNECT, specified at https://tools.ietf.org/html/rfc7231#section-4.3.6, says: > if successful, thereafter restrict its behavior to blind forwarding > of packets, in both directions, until the tunnel is closed. ureq doesn't actually support the semantics of CONNECT, since it doesn't offer a bidirectional channel on a Response. So I'm fairly confident no one is using these methods. --- src/agent.rs | 5 ----- src/lib.rs | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/agent.rs b/src/agent.rs index 18e9f4f..554d4db 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -339,11 +339,6 @@ impl Agent { self.request("OPTIONS", path) } - /// Make a CONNECT request from this agent. - pub fn connect(&self, path: &str) -> Request { - self.request("CONNECT", path) - } - /// Make a PATCH request from this agent. pub fn patch(&self, path: &str) -> Request { self.request("PATCH", path) diff --git a/src/lib.rs b/src/lib.rs index 829657e..54092d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -199,11 +199,6 @@ pub fn options(path: &str) -> Request { request("OPTIONS", path) } -/// Make an CONNECT request. -pub fn connect(path: &str) -> Request { - request("CONNECT", path) -} - /// Make an PATCH request. pub fn patch(path: &str) -> Request { request("PATCH", path)