Skip to content

Add IrmaClient::health() wrapper for the /health endpoint #10

Description

@rubenhensen

irmago v0.15.0 added a `/health` endpoint that returns 200 when the server is ready to serve sessions. Useful for liveness/readiness checks in deployments that consume irmars (e.g. checking the IRMA server is reachable before starting a session).

Proposed surface

Add `IrmaClient::health(&self) -> Result<(), Error>` that issues `GET {base}/health` and returns `Ok(())` on 2xx, mapped `Error::NetworkError` otherwise.

Implementation is a one-liner; the value is having it on the typed client surface so downstream consumers don't reach for `reqwest` directly.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions