rs_zephyr_common/http.rs
1use serde::{Deserialize, Serialize};
2
3/// A generic request object meant to be easily reusable by any HTTP client
4/// request.
5#[derive(Clone, Serialize, Deserialize, Debug)]
6pub struct AgnosticRequest {
7 pub body: Option<String>,
8 pub url: String,
9 pub method: Method,
10 pub headers: Vec<(String, String)>,
11}
12
13/// Methods currently supported are Get and Post.
14#[derive(Clone, Serialize, Deserialize, Debug)]
15pub enum Method {
16 Get,
17 Post,
18}