Skip to main content

rightkit_http/
lib.rs

1//! `rightkit-http`: the shared blocking HTTP client for Right Suite apps.
2//!
3//! - [`Client`]: timeouts, bounded bodies, retry/backoff honoring `Retry-After`,
4//!   retry-safety rules for non-idempotent methods, streaming responses.
5//! - [`sse`]: WHATWG-compliant Server-Sent Events decoding.
6//! - [`untrusted`]: tamper-evident wrapping of external text for model input.
7//! - [`secret`]: redacted [`Secret`] and the [`SecretStore`] interface that
8//!   `rightkit-secrets` implements.
9//! - `testing` (feature): in-process mock server that records exact requests.
10
11pub mod client;
12pub mod error;
13pub mod retry;
14pub mod secret;
15pub mod sse;
16pub mod untrusted;
17
18#[cfg(feature = "testing")]
19pub mod testing;
20
21pub use client::{
22    form_encode, percent_decode, percent_encode, Client, ClientConfig, Method, Request, Response,
23    RetryEvent, StreamResponse,
24};
25pub use error::HttpError;
26pub use retry::{parse_retry_after, RetryPolicy};
27pub use secret::{MemorySecretStore, Secret, SecretError, SecretStore};
28pub use sse::{SseDecoder, SseEvent, SseReader};
29pub use untrusted::{wrap_untrusted_web_text, wrap_untrusted_web_text_with, WrapOptions};