Crates.io | asession |
lib.rs | asession |
version | 0.1.2 |
source | src |
created_at | 2023-06-26 11:51:36.355905 |
updated_at | 2023-06-27 11:25:49.959939 |
description | a user-friendly Client wrapper |
homepage | https://github.com/adlsdztony/asession |
repository | https://github.com/adlsdztony/asession |
max_upload_size | |
id | 900283 |
size | 7,536 |
a user-friendly Client wrapper, which automatically handles cookies and load/store cookies from/to the specified path.
use asession::SessionBuilder;
#[tokio::main]
async fn main() {
let session: Session = SessionBuilder::new()
.cookies_store_into("cookies.json".into())
.build().unwrap();
let res = session.post("https://www.example.com")
.form(&[("key", "value")])
.send()
.await
.unwrap();
}