1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Tiny library face — RISC by design. The only thing `Client` does
//! is hold a pipe spec and dispatch `(method, path) -> Response`.
//!
//! There are no `cache()` / `retry()` / `timeout()` builder methods.
//! If you want any of those, put them in the spec — same shape that
//! goes in `proxima.toml`. Sugar exists separately (`proxima::desugar`)
//! and is a pure transformation: feed it a sugary spec, read the
//! desugared output to learn how the primitives compose.
//!
//! ```no_run
//! # async fn doc() -> Result<(), proxima::ProximaError> {
//! // plain http
//! let client = proxima::Client::from_value(serde_json::json!({
//! "http": "https://api.example.com",
//! }))?;
//! let resp = client.call("GET", "/v1/items").send().await?;
//! let body: serde_json::Value = resp.json().await?;
//!
//! // cached http (sugar form — see proxima::desugar for the expansion)
//! let client = proxima::Client::from_sugar(serde_json::json!({
//! "http": "https://api.example.com",
//! "cache": true,
//! }))?;
//! # Ok(())
//! # }
//! ```
pub use FramedClient;
pub use ;
pub use ClientProtocolExt;
pub use RequestBuilder;
pub use Response;
pub use ClientSecurityExt;
pub use ClientTransportExt;