ComponentsUtilities

HTTP

Helpers around HttpClient: query params from a filter object, retries of reads with back-off and Retry-After, and pipes that turn a status code into a kit tone and a translated label.

Part of @tectra-ng/utils (npm install @tectra-ng/utils, also included in tectra-ng).

Features3APIThemingAccessibility

Params

buildHttpParams leaves out what is not set, repeats a key for every picked item and writes dates as ISO strings. Fill the filters and watch the query.

GET /api/orders?status=paid&status=shipped&page=1

Retry

A pretend server answers 503 twice, then 200. retryHttpReads waits longer before every new try; a 404 fails at once. Short delays here so you can watch it.

Status

Status codes as kit tags: the tone from txHttpStatusTone, the text from txHttpStatusLabel in the tectra locale. Codes you pass as warnings get the warn tone.

/ 200 · OK
/old-pricing 301 · Redirect
/beta 299 · Warning
/admin 403 · Client error
/api/search 503 · Server error
/status — · No response