3 releases
| 0.1.2 | Oct 9, 2022 |
|---|---|
| 0.1.1 | Oct 9, 2022 |
| 0.1.0 | Oct 9, 2022 |
#262 in #hyper
27KB
585 lines
Easy HTTP Request
Easy to send HTTP/HTTPS requests.
Example
use talap::Request;
async fn status(){
let response = Request::get_from_url("https://www.apple.com/").await.unwrap().send().await.unwrap();
assert_eq!(response.status_code,200);
}
More examples are in the examples directory.
Easy to send HTTP/HTTPS requests.
Example
use talap::Request;
#[tokio::main]
async fn main() {
use std::io::Write;
let response = Request::get_from_url("https://www.apple.com/")
.await
.unwrap()
.send()
.await
.unwrap();
println!("{}", response.status_code);
println!("{:?}", response.headers);
std::io::stdout().write_all(&response.body).unwrap();
}
Dependencies
~24MB
~311K SLoC