From 36e6f0cb4b96bcec8c8f4dd44ab623cb9866b631 Mon Sep 17 00:00:00 2001 From: Aliaksandr Rahalevich Date: Wed, 12 Jun 2019 03:47:00 -0700 Subject: [PATCH] add "put" and "sput" methods for test server (#909) --- test-server/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test-server/src/lib.rs b/test-server/src/lib.rs index b8f5934ae..1fbaa6c74 100644 --- a/test-server/src/lib.rs +++ b/test-server/src/lib.rs @@ -255,6 +255,16 @@ impl TestServerRuntime { self.client.head(self.surl(path.as_ref()).as_str()) } + /// Create `PUT` request + pub fn put>(&self, path: S) -> ClientRequest { + self.client.put(self.url(path.as_ref()).as_str()) + } + + /// Create https `PUT` request + pub fn sput>(&self, path: S) -> ClientRequest { + self.client.put(self.surl(path.as_ref()).as_str()) + } + /// Connect to test http server pub fn request>(&self, method: Method, path: S) -> ClientRequest { self.client.request(method, path.as_ref())