Skip to main content

Http

@dataverket/httpv2026.10.29.1· AGPL-3.0-only· 2d agoBEHAVIORS
01README

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.

02Behaviors1
@dataverket/http/endpointv2026.10.29.1endpoint.ts

Global Arguments

ArgumentTypeDescription
urlstringThe URL to GET, http or https
expectStatus?numberThe status the final answer must have for ok
followRedirects?booleanFollow redirects, at most maxRedirects, and judge the final answer; false judges the first
maxRedirects?number
bodyContains?stringText the final answer's body must hold for ok; empty checks nothing
timeoutMs?numberHow long the whole request may take before it counts as unreachable
caFile?stringA CA certificate (PEM) the chain must verify against, absolute or relative to the repository root; empty uses the system store
userAgent?stringThe User-Agent header sent
fn health()
GET the URL and record status, TLS, latency, redirects and body match; an endpoint that is down or wrong is recorded, not thrown

Resources

health(infinite)— Whether the endpoint answered as expected, over a verified chain, and how fast
03Stats
A
100 / 100
Downloads
3
Archive size
21.3 KB
  • 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
04Platforms
05Labels