pub struct Jar(_);
Expand description
A good default CookieStore
implementation.
This is the implementation used when simply calling cookie_store(true)
.
This type is exposed to allow creating one and filling it with some
existing cookies more easily, before creating a Client
.
For more advanced scenarios, such as needing to serialize the store or manipulate it between requests, you may refer to the reqwest_cookie_store crate.
Implementations
sourceimpl Jar
impl Jar
Add a cookie to this jar.
Example
use reqwest::{cookie::Jar, Url};
let cookie = "foo=bar; Domain=yolo.local";
let url = "https://yolo.local".parse::<Url>().unwrap();
let jar = Jar::default();
jar.add_cookie_str(cookie, &url);
// and now add to a `ClientBuilder`?
Trait Implementations
sourceimpl CookieStore for Jar
impl CookieStore for Jar
Store a set of Set-Cookie header values received from url
Get any Cookie values in the store for url
Auto Trait Implementations
impl RefUnwindSafe for Jar
impl Send for Jar
impl Sync for Jar
impl Unpin for Jar
impl UnwindSafe for Jar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more