UMANTHIR

JavaScript / TypeScript

Client options

All options are optional.

OptionDefaultDescription
baseURLhttps://api.umanthir.comAPI address. Must use https; http is allowed only for localhost.
apiKey—Sent as Authorization: Bearer <apiKey>. Never logged. See API keys.
timeout30000Timeout of each attempt, in milliseconds.
maxRetries2Retries after a network error, 429, 502, 503 or 520 (GET only).
fetchglobal fetchCustom fetch implementation.
logLevel"warn""off", "error", "warn", "info" or "debug". In Node.js, UMANTHIR_LOG sets it when the option is absent.
debugfalseShortcut for logLevel: "debug".
loggerconsoleAny object with debug, info, warn and error methods (pino, winston, ...).
logBodiesfalseInclude response bodies, truncated to 2 KB, in debug logs.
onRequest—Called before every attempt, with redacted headers.
onResponse—Called after every attempt that got a response.
onWarning—Called for every warning. See Warnings.

Every method also accepts per-call options as its last argument: { signal, timeout, maxRetries }.

Next: Resources.

Cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.

Manage cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.