http_endpoint_server_harness/entities/
method.rs

1/// HTTP methods supported by the harness
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3pub enum Method {
4    Get,
5    Post,
6    Put,
7    Patch,
8    Delete,
9    Head,
10    Options,
11}
12
13impl std::fmt::Display for Method {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15        match self {
16            Method::Get => write!(f, "GET"),
17            Method::Post => write!(f, "POST"),
18            Method::Put => write!(f, "PUT"),
19            Method::Patch => write!(f, "PATCH"),
20            Method::Delete => write!(f, "DELETE"),
21            Method::Head => write!(f, "HEAD"),
22            Method::Options => write!(f, "OPTIONS"),
23        }
24    }
25}
26