diff --git a/test-server/src/lib.rs b/test-server/src/lib.rs index 75f75b1e9..b64ff433e 100644 --- a/test-server/src/lib.rs +++ b/test-server/src/lib.rs @@ -159,33 +159,33 @@ impl TestServerRuntime { } /// Create `GET` request - pub fn get(&self) -> ClientRequest { - self.client.get(self.url("/").as_str()) + pub fn get>(&self, path: S) -> ClientRequest { + self.client.get(self.url(path.as_ref()).as_str()) } /// Create https `GET` request - pub fn sget(&self) -> ClientRequest { - self.client.get(self.surl("/").as_str()) + pub fn sget>(&self, path: S) -> ClientRequest { + self.client.get(self.surl(path.as_ref()).as_str()) } /// Create `POST` request - pub fn post(&self) -> ClientRequest { - self.client.post(self.url("/").as_str()) + pub fn post>(&self, path: S) -> ClientRequest { + self.client.post(self.url(path.as_ref()).as_str()) } /// Create https `POST` request - pub fn spost(&self) -> ClientRequest { - self.client.post(self.surl("/").as_str()) + pub fn spost>(&self, path: S) -> ClientRequest { + self.client.post(self.surl(path.as_ref()).as_str()) } /// Create `HEAD` request - pub fn head(&self) -> ClientRequest { - self.client.head(self.url("/").as_str()) + pub fn head>(&self, path: S) -> ClientRequest { + self.client.head(self.url(path.as_ref()).as_str()) } /// Create https `HEAD` request - pub fn shead(&self) -> ClientRequest { - self.client.head(self.surl("/").as_str()) + pub fn shead>(&self, path: S) -> ClientRequest { + self.client.head(self.surl(path.as_ref()).as_str()) } /// Connect to test http server