use std::collections::HashMap;
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct FeedHttpResponse {
pub status: u16,
pub url: String,
pub headers: HashMap<String, String>,
pub body: Vec<u8>,
pub etag: Option<String>,
pub last_modified: Option<String>,
pub content_type: Option<String>,
}
impl FeedHttpResponse {
#[must_use]
pub fn new(status: u16, url: impl Into<String>) -> Self {
Self {
status,
url: url.into(),
headers: HashMap::new(),
body: Vec::new(),
etag: None,
last_modified: None,
content_type: None,
}
}
}