asession

Crates.ioasession
lib.rsasession
version0.1.2
sourcesrc
created_at2023-06-26 11:51:36.355905
updated_at2023-06-27 11:25:49.959939
descriptiona user-friendly Client wrapper
homepagehttps://github.com/adlsdztony/asession
repositoryhttps://github.com/adlsdztony/asession
max_upload_size
id900283
size7,536
Zilong Zhou (adlsdztony)

documentation

README

asession

a user-friendly Client wrapper, which automatically handles cookies and load/store cookies from/to the specified path.

usage

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();
}
Commit count: 7

cargo fmt