mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 13:51:50 +01:00
add "put" and "sput" methods for test server (#909)
This commit is contained in:
parent
7450ae37a7
commit
36e6f0cb4b
@ -255,6 +255,16 @@ impl TestServerRuntime {
|
|||||||
self.client.head(self.surl(path.as_ref()).as_str())
|
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
|
/// Connect to test http server
|
||||||
pub fn request<S: AsRef<str>>(&self, method: Method, path: S) -> ClientRequest {
|
pub fn request<S: AsRef<str>>(&self, method: Method, path: S) -> ClientRequest {
|
||||||
self.client.request(method, path.as_ref())
|
self.client.request(method, path.as_ref())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user