Skip to content

Commit

Permalink
doc: clarify Cookie API usage (seanmonstar#2111)
Browse files Browse the repository at this point in the history
`cookie_store` and `cookie_provider` both enable the cookie store
functionality; clarify the usage and potential for a custom store
being overwritten if both are used.
  • Loading branch information
pfernie committed Jan 24, 2024
1 parent b3feff6 commit 87cdf12
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,11 @@ impl ClientBuilder {
/// Cookies received in responses will be preserved and included in
/// additional requests.
///
/// By default, no cookie store is used.
/// By default, no cookie store is used. Enabling the cookie store
/// with `cookie_store(true)` will set the store to a default implementation.
/// It is **not** necessary to call [cookie_store(true)](crate::ClientBuilder::cookie_store) if [cookie_provider(my_cookie_store)](crate::ClientBuilder::cookie_provider)
/// is used; calling [cookie_store(true)](crate::ClientBuilder::cookie_store) _after_ [cookie_provider(my_cookie_store)](crate::ClientBuilder::cookie_provider) will result
/// in the provided `my_cookie_store` being **overridden** with a default implementation.
///
/// # Optional
///
Expand All @@ -807,7 +811,10 @@ impl ClientBuilder {
/// Cookies received in responses will be passed to this store, and
/// additional requests will query this store for cookies.
///
/// By default, no cookie store is used.
/// By default, no cookie store is used. It is **not** necessary to also call
/// [cookie_store(true)](crate::ClientBuilder::cookie_store) if [cookie_provider(my_cookie_store)](crate::ClientBuilder::cookie_provider) is used; calling
/// [cookie_store(true)](crate::ClientBuilder::cookie_store) _after_ [cookie_provider(my_cookie_store)](crate::ClientBuilder::cookie_provider) will result
/// in the provided `my_cookie_store` being **overridden** with a default implementation.
///
/// # Optional
///
Expand Down

0 comments on commit 87cdf12

Please sign in to comment.