Seatbelt Http
HTTP-specific extensions for the seatbelt resilience middleware.
Each seatbelt middleware is generic over its input and output types.
This crate specializes them for HttpRequest /
Result<HttpResponse> and adds HTTP-aware
builder methods, all prefixed with http_.
Supported middleware
Each middleware lives in its own feature-gated module with specialized type aliases and an extension trait:
| Module | Feature | Purpose |
|---|---|---|
retry |
retry |
Recovery classification, request cloning, request restoration from errors. |
timeout |
timeout |
Converts timeout events into HTTP-specific errors. |
hedging |
hedging |
Recovery classification and request cloning for tail-latency reduction. |
breaker |
breaker |
Recovery classification and rejected-request error handling. |
Shared types
HttpRecovery: classifies HTTP responses as recoverable. By default, 5xx status codes,429 Too Many Requests, and request timeouts are treated as transient.HttpClone: selects which HTTP methods are eligible for cloning during retries and hedging (safe-only, idempotent, or all).HttpResilienceContext: the HTTP specialization ofResilienceContext.