Skip to main content

Crate altair_rest

Crate altair_rest 

Source
Expand description

Resilient HTTP client built on reqwest with retry and OTel-aware tracing middleware baked in.

Wraps reqwest_middleware::ClientWithMiddleware with a sensible-default middleware chain so each outgoing request automatically gets exponential backoff on transient failures plus a per-request tracing span. The underlying reqwest and reqwest_middleware crates are re-exported at the crate root so consumers don’t need to add them separately.

§Example

use altair_rest::Client;

let client = Client::builder()
    .base_url("https://api.example.com")?
    .bearer_token("secret-token")
    .build()?;

let response = client.get("/users/42").send().await?;

Re-exports§

pub use ::http;
pub use ::reqwest;
pub use ::reqwest_middleware;
pub use ::url;

Modules§

prelude
Common imports for users of this crate.

Structs§

Client
HTTP client with retry + tracing middleware baked in.
ClientBuilder
Typed builder for Client.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Method
The Request Method (VERB)
Response
A Response to a submitted Request.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Enums§

Error
Errors returned by altair-rest operations.

Type Aliases§

Result
Convenience result alias for this crate.