Gist d10ade16400cfea5ae8dcf371f236cd0
✓ Published0🌍 Public
CCarlos-Augusto
Last edited Nov 1, 2021
Created on Nov 1, 2021
The example demonstrates a client-side health-check function for the Ubirch certification API, probing different deployment stages via HTTPS GET requests. It shows how to authenticate with a PFX certificate file and a hardcoded passphrase, using Node.js’s `https.Agent` with `keepAlive` enabled. The code relies on `node-fetch` for the request and `fs.readFileSync` to load the certificate, then throws errors for non-2xx status codes or empty stage names. It exports the `ping` function as a module, making it reusable across environments.
AI-generated description