Module isahc::cookies

source ·
Available on crate feature cookies only.
Expand description

Types for cookie state management.

By default HTTP is a mostly stateless protocol, but using cookies allow a server to request a client to persist specific state between requests. Isahc does not do this by default, but provides support for cookie state using a cookie jar, which can store a list of cookies in memory between requests and is responsible for keeping track of which cookies belong to which domains.

A cookie jar can be used on a per-request basis or for all requests sent via a particular HTTP client. You can assign a cookie jar to a request or to a client via the Configurable::cookie_jar extension method. If different cookie jars are assigned on both a request and the client sending the request, the one assigned to the individual request will take precedence.

The global default client instance does not have an assigned cookie jar.

Availability

This module is only available when the cookies feature is enabled.

Structs

Information stored about an HTTP cookie.
Builder for a Cookie.
Provides automatic cookie session management using an in-memory cookie store.
Returned when a Cookie fails to be added to the CookieJar.
An error which can occur when attempting to parse a cookie string.

Enums

The reason why the Cookie was rejected.