1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::collections::HashMap;
#[derive(Deserialize, Serialize)]
pub struct Request {
pub url: String,
pub method: String,
pub body: String,
pub cf: HashMap<String, String>,
pub headers: HashMap<String, String>,
}
#[derive(Deserialize, Serialize)]
pub struct Response {
pub status: u16,
pub headers: HashMap<String, String>,
pub body: String,
}
#[derive(Clone, PartialEq)]
pub enum Method {
Get,
Head,
Post,
Put,
Delete,
Connect,
Options,
Trace,
Patch,
}