Add shortcuts for PATCH (again)`

This commit is contained in:
Jochen Kupperschmidt
2021-10-13 02:31:36 +02:00
committed by Martin Algesten
parent 94a8040706
commit 69ad3aabb0
2 changed files with 10 additions and 0 deletions

View File

@@ -154,6 +154,11 @@ impl Agent {
self.request("HEAD", path) self.request("HEAD", path)
} }
/// Make a PATCH request from this agent.
pub fn patch(&self, path: &str) -> Request {
self.request("PATCH", path)
}
/// Make a POST request from this agent. /// Make a POST request from this agent.
pub fn post(&self, path: &str) -> Request { pub fn post(&self, path: &str) -> Request {
self.request("POST", path) self.request("POST", path)

View File

@@ -401,6 +401,11 @@ pub fn head(path: &str) -> Request {
request("HEAD", path) request("HEAD", path)
} }
/// Make a PATCH request.
pub fn patch(path: &str) -> Request {
request("PATCH", path)
}
/// Make a POST request. /// Make a POST request.
pub fn post(path: &str) -> Request { pub fn post(path: &str) -> Request {
request("POST", path) request("POST", path)