wtx 0.44.1

A collection of different transport implementations and related tools focused primarily on web technologies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{
  http::{HttpClient, ReqBuilder, ReqResBuffer, client_pool::ClientPoolBuilder},
  misc::UriRef,
};

#[tokio::test]
async fn popular_sites() {
  send_recv("https://github.com".into()).await;
  send_recv("https://duckduckgo.com".into()).await;
  send_recv("https://www.google.com".into()).await;
}

async fn send_recv(uri: UriRef<'_>) {
  let client = ClientPoolBuilder::tokio_rustls(1).build();
  let _res = client.send_req_recv_res(ReqBuilder::get(uri), ReqResBuffer::empty()).await.unwrap();
}