3 releases
0.1.2 | Jun 27, 2023 |
---|---|
0.1.1 | Jun 26, 2023 |
0.1.0 | Jun 26, 2023 |
#541 in HTTP client
Used in 2 crates
(via authku)
8KB
150 lines
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();
}
Dependencies
~6–18MB
~275K SLoC