use crate::rubase::BaseEntity;
use crate::rudi::didto;
use crate::rulog;
#[cfg(test)]
mod tests {
#[test]
fn test_01_client() {
assert_eq!(2 + 2, 4);
}
#[test]
fn test_02_post_cli() {
assert_eq!(2 + 2, 4);
let client = reqwest::Client::new();
let data = serde_json::json!({ "key": "value" });
let res = client.post("https://httpbin.org/post")
.json(&data)
.send() ;
}
#[test]
fn test_03_get_cli() {
let response = reqwest::blocking::get("https://www.baidu.com");
let body = response.unwrap().text() ;
println!("Response: {:#?}", body);
}
#[test]
fn test_04_get_cli() {
let response = reqwest::blocking::get("https://www.baidu.com");
let body = response.unwrap().text() ;
println!("Response: {:#?}", body);
}
}