dhttp/reqres/
mod.rs

1//! Request, response, status code, and their components
2
3mod status_code;
4pub use status_code::StatusCode;
5mod req;
6pub use req::{HttpRequest, HttpVersion, HttpMethod};
7mod body;
8pub use body::{HttpBody, HttpUpgrade};
9
10pub mod res;
11pub use res::HttpResponse;
12
13pub mod sse;
14
15mod file;
16
17use std::fmt;
18
19/// Header key/value
20#[derive(Clone)]
21pub struct HttpHeader {
22    pub name: String,
23    pub value: String,
24}
25
26impl fmt::Debug for HttpHeader {
27    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
28        write!(fmt, "{}: {}", self.name, self.value)
29    }
30}