reqores 0.1.7

Oversimplified http request/response abstraction layer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::HttpStatusCode;

/// The response made from [`ClientRequest`](`crate::ClientRequest`).
pub trait ClientResponse {
    /// The body of the response.
    fn body(&self) -> &[u8];

    /// The HTTP Status Code made from the response.
    fn status(&self) -> HttpStatusCode;

    /// The header value from the given key.
    fn header(&self, key: &str) -> Option<String>;
}