chttp 0.4.3

The practical HTTP client that is fun to use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::ascii;

pub mod agent;
pub mod notify;
pub mod parse;
pub mod request;

pub fn format_byte_string(bytes: impl AsRef<[u8]>) -> String {
    String::from_utf8(bytes
        .as_ref()
        .iter()
        .flat_map(|byte| ascii::escape_default(*byte))
        .collect())
        .unwrap_or(String::from("<binary>"))
}