mirror of
https://github.com/actix/actix-web.git
synced 2024-12-20 23:26:44 +00:00
add "put" and "sput" methods for test server (#909)
This commit is contained in:
parent
7450ae37a7
commit
36e6f0cb4b
1 changed files with 10 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue