reqwew
Reqwest effortless wrapper.

Usage
Async
use std::sync::LazyLock;
use reqwew::{reqwest::Client, Http, Response};
use serde_json::Value;
pub static CLIENT: LazyLock<Client> = reqwew::lazy(|| Client::default());
let resp = CLIENT.get_with_retries("https://httpbin.org/get", 3, 50).await.unwrap();
assert!(resp.clone().text().contains("httpbin.org"));
assert_eq!(resp.json::<Value>().unwrap()["headers"]["Host"].as_str().unwrap(), "httpbin.org");
let resp = CLIENT.post_with_retries("https://httpbin.org/post", "hello", 3, 50).await.unwrap();
assert!(resp.clone().text().contains("https://httpbin.org/post"));
assert_eq!(resp.json::<Value>().unwrap()["url"].as_str().unwrap(), "https://httpbin.org/post");
Blocking
use std::sync::LazyLock;
use reqwew::{
blocking::Http as BlockingHttp, reqwest::blocking::Client as BlockingClient, Response,
};
use serde_json::Value;
pub static BLOCKING_CLIENT: LazyLock<BlockingClient> = reqwew::lazy(|| BlockingClient::default());
let resp = BLOCKING_CLIENT.get_with_retries("https://httpbin.org/get", 3, 50).unwrap();
assert!(resp.clone().text().contains("httpbin.org"));
assert_eq!(resp.json::<Value>().unwrap()["headers"]["Host"].as_str().unwrap(), "httpbin.org");
let resp = BLOCKING_CLIENT.post_with_retries("https://httpbin.org/post", "hello", 3, 50).unwrap();
assert!(resp.clone().text().contains("https://httpbin.org/post"));
assert_eq!(resp.json::<Value>().unwrap()["url"].as_str().unwrap(), "https://httpbin.org/post");