Expand description
The one place HTTP requests are made and errors mapped.
Shared HTTP plumbing: one pooled [reqwest::Client] per server, one place
that maps transport and status-code failures to GotifyError.
GotifyClient’s every method calls
request_json with the same borrowed
Client rather than each building their own — a fresh reqwest::Client
per call defeats connection pooling and keep-alive under load, so build
one with build_client and reuse it for the
client’s lifetime.
Functions§
- build_
client - Builds the pooled HTTP client used for every request against one server.
- request_
json - Issues one request against
base_urlusing the caller-suppliedclient, and maps the transport/status outcome into aResult.