This commit introduces a cookie store / session support
for both the async and the sync client.
Functionality is based on the cookie crate,
which provides a HTTP cookie abstraction,
and the cookie_store crate which provides a
store that handles cookie storage and url/expiration
based cookie resolution for requests.
Changes:
* adds new private dependencies: time, cookie, cookie_store
* a new cookie module which provides wrapper types around
the dependency crates
* a Response::cookies() accessor for iterating over response cookies
* a ClientBuilder::cookie_store() method that enables session functionality
* addition of a cookie_store member to the async client
* injecting request cookies and persisting response cookies
* cookie tests
NOTE: this commit DOES NOT expose the CookieStore itself,
limiting available functionality.
This is desirable, but omitted for now due to API considerations that should be fleshed out in the future.
This means users do not have direct access to the cookie session for now.
72 lines
2.1 KiB
TOML
72 lines
2.1 KiB
TOML
[package]
|
|
name = "reqwest"
|
|
version = "0.9.13" # remember to update html_root_url
|
|
description = "higher level HTTP client library"
|
|
keywords = ["http", "request", "client"]
|
|
repository = "https://github.com/seanmonstar/reqwest"
|
|
documentation = "https://docs.rs/reqwest"
|
|
authors = ["Sean McArthur <sean@seanmonstar.com>"]
|
|
readme = "README.md"
|
|
license = "MIT/Apache-2.0"
|
|
categories = ["web-programming::http-client"]
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[dependencies]
|
|
base64 = "0.10"
|
|
bytes = "0.4"
|
|
encoding_rs = "0.8"
|
|
futures = "0.1.23"
|
|
http = "0.1.15"
|
|
hyper = "0.12.22"
|
|
flate2 = { version = "^1.0.7", default-features = false, features = ["rust_backend"] }
|
|
log = "0.4"
|
|
mime = "0.3.7"
|
|
mime_guess = "2.0.0-alpha.6"
|
|
serde = "1.0"
|
|
serde_json = "1.0"
|
|
serde_urlencoded = "0.5"
|
|
tokio = { version = "0.1.7", default-features = false, features = ["rt-full", "tcp"] }
|
|
tokio-executor = "0.1.4" # a minimum version so trust-dns-resolver compiles
|
|
tokio-io = "0.1"
|
|
tokio-threadpool = "0.1.8" # a minimum version so tokio compiles
|
|
tokio-timer = "0.2.6" # a minimum version so trust-dns-resolver compiles
|
|
url = "1.2"
|
|
uuid = { version = "0.7", features = ["v4"] }
|
|
|
|
# Optional deps...
|
|
|
|
hyper-old-types = { version = "0.11", optional = true, features = ["compat"] }
|
|
hyper-rustls = { version = "0.16", optional = true }
|
|
hyper-tls = { version = "0.3.2", optional = true }
|
|
native-tls = { version = "0.2", optional = true }
|
|
rustls = { version = "0.15", features = ["dangerous_configuration"], optional = true }
|
|
socks = { version = "0.3.2", optional = true }
|
|
tokio-rustls = { version = "0.9", optional = true }
|
|
trust-dns-resolver = { version = "0.10", optional = true }
|
|
webpki-roots = { version = "0.16", optional = true }
|
|
cookie_store = "0.5.1"
|
|
cookie = "0.11.0"
|
|
time = "0.1.42"
|
|
|
|
[dev-dependencies]
|
|
env_logger = "0.6"
|
|
serde_derive = "1.0"
|
|
tokio-tcp = "0.1"
|
|
libflate = "0.1"
|
|
|
|
[features]
|
|
default = ["default-tls"]
|
|
|
|
tls = []
|
|
|
|
default-tls = ["hyper-tls", "native-tls", "tls"]
|
|
default-tls-vendored = ["default-tls", "native-tls/vendored"]
|
|
|
|
rustls-tls = ["hyper-rustls", "tokio-rustls", "webpki-roots", "rustls", "tls"]
|
|
|
|
trust-dns = ["trust-dns-resolver"]
|
|
|
|
hyper-011 = ["hyper-old-types"]
|