1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 07:36:43 +00:00

add "put" and "sput" methods for test server (#909)

This commit is contained in:
Aliaksandr Rahalevich 2019-06-12 03:47:00 -07:00 committed by Nikolay Kim
parent 7450ae37a7
commit 36e6f0cb4b

View file

@ -255,6 +255,16 @@ impl TestServerRuntime {
self.client.head(self.surl(path.as_ref()).as_str())
}
/// Create `PUT` request
pub fn put<S: AsRef<str>>(&self, path: S) -> ClientRequest {
self.client.put(self.url(path.as_ref()).as_str())
}
/// Create https `PUT` request
pub fn sput<S: AsRef<str>>(&self, path: S) -> ClientRequest {
self.client.put(self.surl(path.as_ref()).as_str())
}
/// Connect to test http server
pub fn request<S: AsRef<str>>(&self, method: Method, path: S) -> ClientRequest {
self.client.request(method, path.as_ref())