Got
Human-friendly and powerful HTTP request library for Node.js. Got provides automatic retries, response parsing, request hooks, stream support, pagination helpers, and timeout handling with a clean promise-based API. Built on top of Node.js http/https with better ergonomics than fetch. The preferred HTTP client for Node.js CLI tools and server-side code before native fetch was added to Node.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
HTTPS enforced by default. TLS certificate validation enabled. Supports proxy via https-proxy-agent. Request/response hooks may log sensitive headers — sanitize beforeSend hooks in production.
⚡ Reliability
Best When
You need a feature-rich Node.js HTTP client with retries, pagination, streaming, and hooks for complex API interactions in agents.
Avoid When
You're targeting the browser or Node.js 18+ with simple request needs — native fetch is sufficient and avoids the dependency.
Use Cases
- • Make HTTP requests in Node.js agent tools with automatic retry logic, exponential backoff, and timeout configuration
- • Stream large API responses (files, bulk data) with Got's stream interface without buffering entire responses in memory
- • Implement paginated API traversal using Got's built-in pagination helper that auto-follows next page links
- • Add request/response hooks for logging, authentication injection, and response transformation in agent HTTP clients
- • Create Got instances with pre-configured base URL, headers, and retry settings for reusable API client instances
Not For
- • Browser-side HTTP requests — Got is Node.js only; use fetch or axios for browser-compatible HTTP
- • New Node.js 18+ projects — native fetch is built into Node.js 18+ and covers most Got use cases; Got adds dependency weight
- • Simple one-off requests — native fetch or node-fetch may be sufficient for basic request needs without retry requirements
Interface
Authentication
Got itself has no auth — it's an HTTP client. Authentication is passed via headers or hooks. Supports Bearer tokens, Basic auth, and custom auth schemes via beforeRequest hooks.
Pricing
Got is open source and free.
Agent Metadata
Known Gotchas
- ⚠ Got 12+ is ESM-only — require('got') fails in CommonJS modules; use dynamic import() or stay on Got 11.x for CJS compatibility
- ⚠ retry.limit default is 2 — retries happen on network errors and 5xx responses by default; explicitly set retry: {limit: 0} to disable for non-idempotent endpoints
- ⚠ Timeout is per-phase by default — {connect: 2000, response: 10000}; setting timeout as a number sets the overall deadline, not per-phase
- ⚠ Got's pagination helper requires manual configuration of paginate.transform and paginate.filter — no auto-detection of pagination patterns
- ⚠ stream() vs request() APIs have different cancellation patterns — use AbortController with request() for cancellable requests in agent pipelines
- ⚠ Got doesn't auto-decompress gzip/br unless you set decompress: true (which IS the default) — verify servers returning compressed responses work correctly
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Got.
Scores are editorial opinions as of 2026-03-06.