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).
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=1Retry
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.
| / | |
| /old-pricing | |
| /beta | |
| /admin | |
| /api/search | |
| /status |