TreasuryPrime.HTTPClient.Httpc (TreasuryPrime v1.0.0)

Copy Markdown View Source

Default TreasuryPrime.HTTPClient adapter, built entirely on Erlang's built-in :httpc (part of the :inets application) and :ssl. This means treasury_prime has no required HTTP dependency at all — no Req, no Finch, no Hackney.

TLS certificates are sourced from :public_key.cacerts_get/0 (available since OTP 25), which uses the OS's trusted CA store. Hostname verification is enforced via :public_key.pkix_verify_hostname_match_fun/1.

This adapter starts a dedicated, isolated :httpc profile (:treasury_prime) the first time it's used, so it does not interfere with :httpc's default profile or any other library/application that happens to also use :httpc.