Skip to content

Commit daefd59

Browse files
authored
Merge pull request #22 from yoshuawuyts/remove-request-shorthands
remove request init shorthands
2 parents 9aae906 + e8e1dca commit daefd59

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

src/request.rs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -65,51 +65,6 @@ impl Request {
6565
self
6666
}
6767

68-
/// Create a new GET request.
69-
pub fn get(url: Url) -> Self {
70-
Self::new(Method::Get, url)
71-
}
72-
73-
/// Create a new HEAD request.
74-
pub fn head(url: Url) -> Self {
75-
Self::new(Method::Head, url)
76-
}
77-
78-
/// Create a new POST request.
79-
pub fn post(url: Url) -> Self {
80-
Self::new(Method::Post, url)
81-
}
82-
83-
/// Create a new PUT request.
84-
pub fn put(url: Url) -> Self {
85-
Self::new(Method::Put, url)
86-
}
87-
88-
/// Create a new DELETE request.
89-
pub fn delete(url: Url) -> Self {
90-
Self::new(Method::Delete, url)
91-
}
92-
93-
/// Create a new CONNECT request.
94-
pub fn connect(url: Url) -> Self {
95-
Self::new(Method::Connect, url)
96-
}
97-
98-
/// Create a new OPTIONS request.
99-
pub fn options(url: Url) -> Self {
100-
Self::new(Method::Options, url)
101-
}
102-
103-
/// Create a new TRACE request.
104-
pub fn trace(url: Url) -> Self {
105-
Self::new(Method::Trace, url)
106-
}
107-
108-
/// Create a new PATCH request.
109-
pub fn patch(url: Url) -> Self {
110-
Self::new(Method::Patch, url)
111-
}
112-
11368
/// Set the lengths of the body.
11469
pub fn set_length(mut self, length: usize) -> Self {
11570
self.length = Some(length);

0 commit comments

Comments
 (0)