Update docs about cookie store
This commit is contained in:
@@ -368,11 +368,20 @@ impl ClientBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Enable a persistent cookie store for the client.
|
/// Enable a persistent cookie store for the client.
|
||||||
///
|
///
|
||||||
/// Cookies received in responses will be preserved and included in
|
/// Cookies received in responses will be preserved and included in
|
||||||
/// additional requests.
|
/// additional requests.
|
||||||
///
|
///
|
||||||
/// By default, no cookie store is used.
|
/// By default, no cookie store is used.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// let client = reqwest::Client::builder()
|
||||||
|
/// .cookie_store(true)
|
||||||
|
/// .build()
|
||||||
|
/// .unwrap();
|
||||||
|
/// ```
|
||||||
pub fn cookie_store(self, enable: bool) -> ClientBuilder {
|
pub fn cookie_store(self, enable: bool) -> ClientBuilder {
|
||||||
self.with_inner(|inner| inner.cookie_store(enable))
|
self.with_inner(|inner| inner.cookie_store(enable))
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/lib.rs
13
src/lib.rs
@@ -1,7 +1,7 @@
|
|||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![deny(missing_debug_implementations)]
|
#![deny(missing_debug_implementations)]
|
||||||
#![cfg_attr(test, deny(warnings))]
|
#![cfg_attr(test, deny(warnings))]
|
||||||
#![doc(html_root_url = "https://docs.rs/reqwest/0.9.17")]
|
#![doc(html_root_url = "https://docs.rs/reqwest/0.9.18")]
|
||||||
|
|
||||||
//! # reqwest
|
//! # reqwest
|
||||||
//!
|
//!
|
||||||
@@ -17,11 +17,6 @@
|
|||||||
//! - Uses system-native [TLS](#tls)
|
//! - Uses system-native [TLS](#tls)
|
||||||
//! - Cookies
|
//! - Cookies
|
||||||
//!
|
//!
|
||||||
//! The rudimentary cookie support means that the cookies need to be manually
|
|
||||||
//! configured for every single request. In other words, there's no cookie jar
|
|
||||||
//! support as of now. The tracking issue for this feature is available
|
|
||||||
//! [on GitHub][cookiejar_issue].
|
|
||||||
//!
|
|
||||||
//! The [`reqwest::Client`][client] is synchronous, making it a great fit for
|
//! The [`reqwest::Client`][client] is synchronous, making it a great fit for
|
||||||
//! applications that only require a few HTTP requests, and wish to handle
|
//! applications that only require a few HTTP requests, and wish to handle
|
||||||
//! them synchronously.
|
//! them synchronously.
|
||||||
@@ -128,6 +123,11 @@
|
|||||||
//! loops, and having a maximum redirect chain of 10 hops. To customize this
|
//! loops, and having a maximum redirect chain of 10 hops. To customize this
|
||||||
//! behavior, a [`RedirectPolicy`][redirect] can used with a `ClientBuilder`.
|
//! behavior, a [`RedirectPolicy`][redirect] can used with a `ClientBuilder`.
|
||||||
//!
|
//!
|
||||||
|
//! ## Cookies
|
||||||
|
//!
|
||||||
|
//! The automatic storing and sending of session cookies can be enabled with
|
||||||
|
//! the [`cookie_store`][ClientBuilder::cookie_store] method on `ClientBuilder`.
|
||||||
|
//!
|
||||||
//! ## Proxies
|
//! ## Proxies
|
||||||
//!
|
//!
|
||||||
//! A `Client` can be configured to make use of HTTP proxies by adding
|
//! A `Client` can be configured to make use of HTTP proxies by adding
|
||||||
@@ -167,7 +167,6 @@
|
|||||||
//! [get]: ./fn.get.html
|
//! [get]: ./fn.get.html
|
||||||
//! [builder]: ./struct.RequestBuilder.html
|
//! [builder]: ./struct.RequestBuilder.html
|
||||||
//! [serde]: http://serde.rs
|
//! [serde]: http://serde.rs
|
||||||
//! [cookiejar_issue]: https://github.com/seanmonstar/reqwest/issues/14
|
|
||||||
//! [redirect]: ./struct.RedirectPolicy.html
|
//! [redirect]: ./struct.RedirectPolicy.html
|
||||||
//! [Proxy]: ./struct.Proxy.html
|
//! [Proxy]: ./struct.Proxy.html
|
||||||
//! [cargo-features]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section
|
//! [cargo-features]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section
|
||||||
|
|||||||
Reference in New Issue
Block a user