fhttp_core/postprocessing/
response.rs

1use reqwest::StatusCode;
2
3#[derive(Debug)]
4pub struct Response {
5    status: StatusCode,
6    body: String
7}
8
9impl Response {
10    pub fn new <S: Into<String>> (
11        status: StatusCode,
12        body: S
13    ) -> Self {
14        Response {
15            status,
16            body: body.into()
17        }
18    }
19
20    pub fn status(&self) -> &StatusCode {
21        &self.status
22    }
23
24    pub fn body(&self) -> &str {
25        &self.body
26    }
27}