A small progressive client-side and Node.js HTTP request library with a consistent API and plugin support.
SuperAgent is a small, progressive HTTP client library for JavaScript that works in both Node.js and browser environments. It provides a fluent, chainable API for making HTTP requests, handling features like JSON serialization, query parameters, headers, and plugins. It solves the problem of needing a consistent, easy-to-use HTTP client across different JavaScript runtimes.
JavaScript developers building applications that need to make HTTP requests, whether in Node.js backends, frontend web apps, or isomorphic/universal JavaScript projects.
Developers choose SuperAgent for its elegant, consistent API across Node and browsers, its lightweight size, and its extensible plugin system. It offers a more feature-rich and developer-friendly alternative to native fetch or older libraries like XMLHttpRequest.
Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The same fluent, chainable API works seamlessly in Node.js and browsers, as shown in the unified usage examples, reducing context switching.
At only 50 KB minified and gzipped, it's efficient for web applications without adding significant bundle bloat, per the README.
A wide range of community plugins for caching, mocking, and authentication allows easy functionality extension, as listed in the Plugins section.
Supports async/await, promises, and callbacks, catering to modern and legacy code patterns, demonstrated in the Node usage examples.
Frequent breaking changes, such as from 5.x to 6.x and 3.x to 4.x, require careful migration and testing, as noted in the upgrading section.
Full browser support requires polyfills for features like WeakRef and BigInt, adding setup complexity for older browsers, as mentioned in Required Browser Features.
Features like automatic retries or interceptors are not built-in by default and rely on plugins or custom code, unlike some competitors.