http_type/methods/
enum.rs

1use crate::*;
2
3/// Defines the `Method` enum, representing HTTP request methods.
4///
5/// This enum provides a comprehensive list of standard HTTP methods,
6/// such as GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, CONNECT, and TRACE.
7/// It also includes an `UNKNOWN` variant for unrecognized methods.
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9pub enum Method {
10    /// Represents the HTTP `GET` method.
11    Get,
12    /// Represents the HTTP `POST` method.
13    Post,
14    /// Represents the HTTP `PUT` method.
15    Put,
16    /// Represents the HTTP `DELETE` method.
17    Delete,
18    /// Represents the HTTP `PATCH` method.
19    Patch,
20    /// Represents the HTTP `HEAD` method.
21    Head,
22    /// Represents the HTTP `OPTIONS` method.
23    Options,
24    /// Represents the HTTP `CONNECT` method.
25    Connect,
26    /// Represents the HTTP `TRACE` method.
27    Trace,
28    /// Unknown
29    Unknown(String),
30}