version bump for doc fixes
This commit is contained in:
parent
df42f782b9
commit
2f893cd6d4
2 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "reqwest_cookie_store"
|
name = "reqwest_cookie_store"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
authors = ["Patrick Fernie <patrick.fernie@gmail.com>"]
|
authors = ["Patrick Fernie <patrick.fernie@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "A simple crate providing an implementation of the `reqwest::cookie::CookieStore` trait for `cookie_store::CookieStore`"
|
description = "A simple crate providing an implementation of the `reqwest::cookie::CookieStore` trait for `cookie_store::CookieStore`"
|
||||||
|
|
10
README.md
10
README.md
|
@ -3,11 +3,12 @@
|
||||||
`reqwest_cookie_store` provides implementations of `reqwest::cookie::CookieStore` for [https://crates.io/crates/cookie_store](cookie_store)
|
`reqwest_cookie_store` provides implementations of `reqwest::cookie::CookieStore` for [https://crates.io/crates/cookie_store](cookie_store)
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
The following example demonstrates loading a `cookie_store::CookieStore` from disk, and using it within a
|
The following example demonstrates loading a [`cookie_store::CookieStore`] from disk, and using it within a
|
||||||
`CookieStoreMutex`. It then makes a series of requests, examining and modifying the contents
|
[`CookieStoreMutex`]. It then makes a series of requests, examining and modifying the contents
|
||||||
of the underlying `cookie_store::CookieStore` in between.
|
of the underlying [`cookie_store::CookieStore`] in between.
|
||||||
|
|
||||||
```rust
|
```no_run
|
||||||
|
# tokio_test::block_on(async {
|
||||||
// Load an existing set of cookies, serialized as json
|
// Load an existing set of cookies, serialized as json
|
||||||
let cookie_store = {
|
let cookie_store = {
|
||||||
let file = std::fs::File::open("cookies.json")
|
let file = std::fs::File::open("cookies.json")
|
||||||
|
@ -71,4 +72,5 @@ client.get("https://google.com").send().await.unwrap();
|
||||||
let store = cookie_store.lock().unwrap();
|
let store = cookie_store.lock().unwrap();
|
||||||
store.save_json(&mut writer).unwrap();
|
store.save_json(&mut writer).unwrap();
|
||||||
}
|
}
|
||||||
|
# });
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue