api_client library
Declarative API client with typed responses, retries, and interceptors.
Classes
- ApiClient
- Declarative API client with interceptors and retry support.
- ApiRequest
- An HTTP request configuration.
- ApiResponse
- An HTTP response with typed accessors.
- CacheInterceptor
- Interceptor that caches GET responses in memory.
- HeaderInterceptor
- Interceptor that adds headers to every request.
- Interceptor
- Intercepts requests and responses for cross-cutting concerns.
- LogInterceptor
- Interceptor that logs requests and responses to a callback.
- RetryConfig
- Configuration for automatic request retries.
Exceptions / Errors
- ApiError
- Base error for API operations.
- HttpError
- Thrown when the server returns a non-2xx status.
- RetryExhaustedError
- Thrown when all retry attempts are exhausted.
- TimeoutError
- Thrown when a request times out.