Skip to main content

Crate rightkit_http

Crate rightkit_http 

Source
Expand description

rightkit-http: the shared blocking HTTP client for Right Suite apps.

  • Client: timeouts, bounded bodies, retry/backoff honoring Retry-After, retry-safety rules for non-idempotent methods, streaming responses.
  • Multipart: multipart/form-data bodies with exact framing.
  • netpolicy: the outbound address policy (SSRF guard) every request passes: resolve once, classify every address, connect only to checked addresses, on every redirect hop.
  • CancelToken: cooperative cancellation for calls and streams.
  • sse: WHATWG-compliant Server-Sent Events decoding.
  • untrusted (feature, off by default): tamper-evident wrapping of external text for model input.
  • secret: redacted Secret and the SecretStore interface that rightkit-credentials implements.
  • async_client (feature async): [AsyncClient], the same policy layer on reqwest/tokio, with a body [BodyStream] and an async [SseStream].
  • testing (feature): in-process mock server that records exact requests.

Re-exports§

pub use cancel::is_cancelled_io;
pub use cancel::CancelToken;
pub use client::form_encode;
pub use client::percent_decode;
pub use client::percent_decode_component;
pub use client::percent_encode;
pub use client::percent_encode_component;
pub use client::AttemptDelivery;
pub use client::AttemptEvent;
pub use client::AttemptOutcome;
pub use client::Client;
pub use client::ClientConfig;
pub use client::Method;
pub use client::ProxyDiagnostic;
pub use client::ProxyMode;
pub use client::ProxyModeUsed;
pub use client::Request;
pub use client::Response;
pub use client::ResponseHead;
pub use client::RetryEvent;
pub use client::StreamResponse;
pub use client::TrustRoots;
pub use error::ErrorClass;
pub use error::HttpError;
pub use error::Phase;
pub use multipart::Multipart;
pub use multipart::MultipartRelated;
pub use netpolicy::parse_host_ip;
pub use netpolicy::parse_legacy_ipv4;
pub use netpolicy::validate_public_https_url;
pub use netpolicy::AddressClass;
pub use netpolicy::AddressPolicy;
pub use netpolicy::CredentialScope;
pub use netpolicy::HostIpKind;
pub use netpolicy::IpNet;
pub use netpolicy::ParsedHostIp;
pub use netpolicy::ResolveError;
pub use netpolicy::UrlPolicyError;
pub use quota::defer_in;
pub use quota::remaining_in;
pub use quota::QuotaSchedule;
pub use quota::QuotaStore;
pub use retry::parse_rate_limit_reset;
pub use retry::parse_rate_limit_reset_at;
pub use retry::parse_retry_after;
pub use retry::parse_retry_after_at;
pub use retry::RetryPolicy;
pub use secret::MemorySecretStore;
pub use secret::Secret;
pub use secret::SecretError;
pub use secret::SecretStore;
pub use sse::EofPolicy;
pub use sse::SseDecoder;
pub use sse::SseEvent;
pub use sse::SseReader;

Modules§

cancel
Cooperative cancellation shared by buffered calls and streams.
client
error
multipart
multipart/form-data request bodies with exact, testable framing.
netpolicy
Outbound address policy: address classification and the SSRF guard behind every crate::Client and [crate::AsyncClient] request.
quota
Durable per-provider quota scheduling.
retry
secret
Secret handling shared by the net crates. rightkit-credentials (built in parallel) supplies the production SecretStore implementation (Keychain / Credential Manager); this crate only defines the interface so net crates do not depend on unfinished code.
sse
Server-Sent Events decoder (WHATWG EventSource framing): LF, CR and CRLF line endings, multi-line data, comments, id, retry, BOM, bounded line size.