pub trait HttpResponse {
type Body: Read;
// Required methods
fn status(&self) -> u16;
fn reason(&self) -> &str;
fn headers(&self) -> Headers;
fn body(&mut self) -> &mut Self::Body;
// Provided methods
fn is_1xx(&self) -> bool { ... }
fn is_2xx(&self) -> bool { ... }
fn is_3xx(&self) -> bool { ... }
fn is_4xx(&self) -> bool { ... }
fn is_5xx(&self) -> bool { ... }
}Expand description
It represents the Server response received by the client after sending a HTTP request.
Required Associated Types§
Required Methods§
Sourcefn reason(&self) -> &str
fn reason(&self) -> &str
Reason-phrase that describes the status code. i.e. 200 OK, 404 Not Found