Http
One HTTP or HTTPS endpoint, asked whether it answers, as swamp data.
One model type, @dataverket/http/endpoint, one URL. health GETs it, follows redirects and counts them, and records the final URL, the status, whether the TLS chain verified against the system store or a CA file of your own, the latency, and whether the body holds a text you name. An endpoint that is down, slow, wrong or serving a chain that does not verify is recorded with the reason, never thrown, so a workflow asserts over many endpoints and names every one that failed. Made for the morning check of a website, a registry's /v2/, an OIDC discovery document, a forum, next to the forges and gateways @dataverket/platform-health already checks, and that workflow takes these endpoints too. No credential, no header beyond User-Agent, nothing written anywhere.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| url | string | The URL to GET, http or https |
| expectStatus? | number | The status the final answer must have for ok |
| followRedirects? | boolean | Follow redirects, at most maxRedirects, and judge the final answer; false judges the first |
| maxRedirects? | number | |
| bodyContains? | string | Text the final answer's body must hold for ok; empty checks nothing |
| timeoutMs? | number | How long the whole request may take before it counts as unreachable |
| caFile? | string | A CA certificate (PEM) the chain must verify against, absolute or relative to the repository root; empty uses the system store |
| userAgent? | string | The User-Agent header sent |
Resources
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned