Skip to main content

gov_uk_sdk_core/
lib.rs

1//! Shared HTTP client, authentication, rate limiting, and error handling for
2//! GOV.UK / Companies House SDK crates.
3//!
4//! Product crates should depend only on this crate for HTTP and wire endpoints through
5//! [`SdkClient::get`] / [`SdkClient::post`] or [`SdkClient::request`].
6
7mod client;
8mod error;
9mod expiry;
10mod message;
11mod negotiated;
12mod rate_limit;
13mod request;
14mod validation;
15
16pub use client::{Auth, SdkBuildError, SdkClient, SdkClientBuilder, COMPANIES_HOUSE_API_ROOT};
17
18/// Re-export for callers that need a non-default HTTP method via [`SdkClient::request`].
19pub use reqwest::Method;
20pub use error::SdkError;
21pub use message::ApiMessage;
22pub use expiry::ChDeprecation;
23pub use negotiated::NegotiatedResponse;
24pub use request::SdkRequest;
25pub use validation::{vendor_content_type, Validation};
26
27/// Standard result type for SDK operations.
28pub type SdkResult<T> = Result<T, SdkError>;