{"id":21877,"library":"rezo","title":"Rezo HTTP Client","description":"Rezo (v1.0.133) is an enterprise-grade HTTP client for JavaScript/TypeScript, supporting Node.js 22+, Bun, Deno, browsers, React Native, and edge runtimes. It features 6 adapters (HTTP, HTTP/2, cURL, Fetch, XHR, React Native) with automatic selection, full HTTP/2 support, intelligent cookie management, proxy rotation (HTTP/HTTPS/SOCKS), stealth mode with browser TLS fingerprinting, web crawling with SQLite persistence, request queuing, streaming, and 70+ structured error codes. Published on npm with weekly releases, it differentiates itself from alternatives like Axios or Got by providing a unified API across environments, built-in proxy rotation, and advanced web crawling capabilities.","status":"active","version":"1.0.133","language":"javascript","source_language":"en","source_url":"https://github.com/yuniqsolutions/rezo","tags":["javascript","http","http2","https","http-client","request","response","fetch","curl","typescript"],"install":[{"cmd":"npm install rezo","lang":"bash","label":"npm"},{"cmd":"yarn add rezo","lang":"bash","label":"yarn"},{"cmd":"pnpm add rezo","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Rezo is ESM-only. CommonJS require() will fail. Use dynamic import() if needed in CJS.","wrong":"const rezo = require('rezo')","symbol":"default","correct":"import rezo from 'rezo'"},{"note":"Rezo class is a named export. The default export is a pre-configured instance.","wrong":"import Rezo from 'rezo'","symbol":"Rezo","correct":"import { Rezo } from 'rezo'"},{"note":"RezoError is a named export; do not use default import.","wrong":"import RezoError from 'rezo'","symbol":"RezoError","correct":"import { RezoError } from 'rezo'"},{"note":"TypeScript types are exported; use import type for compile-only imports.","symbol":"type definitions","correct":"import type { RezoConfig, RezoRequestConfig, RezoResponse } from 'rezo'"}],"quickstart":{"code":"import rezo from 'rezo';\n\n// GET request\nconst { data } = await rezo('https://jsonplaceholder.typicode.com/posts');\nconsole.log(data);\n\n// POST with JSON\nconst { data: user } = await rezo.postJson('https://jsonplaceholder.typicode.com/users', {\n  name: 'Ada Lovelace',\n  email: 'ada@example.com'\n});\n\n// Create instance with base URL\nconst client = rezo.create({\n  baseURL: 'https://jsonplaceholder.typicode.com',\n  timeout: 5000\n});\n\n// GET via instance\nconst { data: posts } = await client.get('/posts');\n\n// Error handling\ntry {\n  await rezo('https://invalid.url');\n} catch (err) {\n  console.error(err.name, err.message);\n}","lang":"typescript","description":"Basic GET, POST, instance creation, and error handling with Rezo HTTP client."},"warnings":[{"fix":"Use import syntax or dynamic import() in CommonJS modules.","message":"Rezo is pure ESM and requires Node.js >= 22. Using require() will throw ERR_REQUIRE_ESM.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly select adapter via adapter option or use create() with adapter: 'http' or 'http2' for Node.js.","message":"Adapters are auto-selected but the default may not support cookies in all runtimes (e.g., Fetch adapter in browsers lacks cookie support).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate to async/await and use RezoError instead of old Error subclasses.","message":"Major version 1.0.0 introduced breaking changes from earlier alphas: removed synchronous methods, changed error class names.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change const rezo = require('rezo') to import rezo from 'rezo'","cause":"Rezo is ESM-only; CommonJS require() not allowed.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Ensure you import the default export: import rezo from 'rezo'","cause":"Using default import incorrectly on an instance without .postJson method.","error":"TypeError: rezo.postJson is not a function"},{"fix":"Catch RezoError and check .status or .code for structured handling.","cause":"Server returned 404; RezoError includes code and status.","error":"Unhandled Rejection - RezoError: Request failed with status code 404 - Resource not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}