barehttp 0.1.0

Blocking HTTP/1.1 client for no_std + alloc
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::transport::PoolKey;
use alloc::string::String;

#[test]
fn pool_key_scheme_distinguishes_same_host_port() {
  let http = PoolKey::new(String::from("http"), "example.com", 443);
  let https = PoolKey::new(String::from("https"), "example.com", 443);
  assert_ne!(http, https);
}

#[test]
fn pool_key_lowercases_host() {
  let mixed = PoolKey::new(String::from("http"), "Example.COM", 80);
  let lower = PoolKey::new(String::from("http"), "example.com", 80);
  assert_eq!(mixed, lower);
}