Expand description
typeway-client — type-safe HTTP client derived from Typeway API types.
The client calls endpoints using the same types as the server. If the server’s API type changes, the client fails to compile until updated.
Re-exports§
pub use call::CallEndpoint;pub use client::Client;pub use config::ClientConfig;pub use error::ClientError;pub use interceptor::RequestInterceptor;pub use interceptor::ResponseInterceptor;pub use request_builder::RequestBuilder;pub use retry::RetryPolicy;pub use tracing_interceptor::with_tracing;pub use typed_response::TypedResponse;
Modules§
- call
- The
CallEndpointtrait — type-safe endpoint invocation. - client
- The type-safe
Clientfor calling API endpoints. - config
- Client configuration with timeout, retry, interceptor, and header settings.
- error
- Client error types.
- interceptor
- Request and response interceptors for the
Client. - methods
- The
client_api!macro for generating named client wrapper structs. - request_
builder - Per-call
RequestBuilderfor overriding headers, query params, and timeouts. - retry
- Retry policy with exponential backoff and jitter.
- streaming
- Streaming response support for the
crate::Client. - tracing_
interceptor - Built-in tracing support for the
Client. - typed_
response - The
TypedResponsewrapper — a deserialized body paired with HTTP metadata.
Macros§
- client_
api - Generate a named client wrapper struct with a method per endpoint.