Skip to main content

lmn_core/command/
method.rs

1#[derive(Clone, Copy, Debug)]
2pub enum HttpMethod {
3    Get,
4    Post,
5    Put,
6    Patch,
7    Delete,
8}
9
10impl HttpMethod {
11    pub fn as_str(self) -> &'static str {
12        match self {
13            HttpMethod::Get => "GET",
14            HttpMethod::Post => "POST",
15            HttpMethod::Put => "PUT",
16            HttpMethod::Patch => "PATCH",
17            HttpMethod::Delete => "DELETE",
18        }
19    }
20}