Default request timeout in milliseconds (default 30000).
Send an HTTP request to the given URL, with automatic retries on transport errors.
Request configuration (URL, method, timeout, headers, etc.).
Optionaldata: string | object
Request body, serialized to JSON via JSON.stringify.
The parsed JSON response (or raw text when json: false).
HttpResponseError when the server returns HTTP status >= 400.
HttpTimeoutError when the request exceeds the configured timeout.
HttpRequestFailed for transport-level failures (network, DNS, socket, etc.).
ProtectedserializeSerialize an object into a URL query string (including the leading ?).
Optionalobj: ObjectType
HTTP client used by octez.js to communicate with Tezos RPC nodes.
Uses
globalThis.fetch(Node.js >= 22 built-in or browser native). Retries retriable transport errors (socket resets, DNS, timeouts) and transient server responses (429/502/503/504) on idempotent/retriable requests, honoring a Retry-After header when the server sends one, else falling back to exponential backoff with jitter. Configure via environment variables:OCTEZJS_HTTP_RETRY_COUNT- max retries (default1)OCTEZJS_HTTP_RETRY_BASE_MS- base delay in ms (default100)OCTEZJS_HTTP_TRACE- emit JSON request logs whentrueor1TAQUITO_HTTP_RETRY_COUNT/TAQUITO_HTTP_RETRY_BASE_MS/TAQUITO_HTTP_TRACE- deprecated aliases for the above, still honored when theOCTEZJS_*name is unset