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

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

Store a set of Set-Cookie header values received from url

Get any Cookie values in the store for url

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more