uberfetch is a thin convenience wrapper around the native Fetch API that sets JSON as the default format and converts HTTP error responses (non-2xx status codes) into rejected promises. Current stable version is 1.0.1. The library simplifies common fetch patterns: automatic JSON stringification and parsing, method-specific helpers (get, post, put, patch, delete), and a RequestError class for typed error handling. It relies on the browser's built-in fetch or a polyfill like github/fetch. Minimal—no complex configuration, ideal for projects that want a lightweight alternative to Axios or Ky.
npm install uberfetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows GET and POST requests with JSON handling and typed error catching using uberfetch.RequestError.
Install a fetch polyfill like 'whatwg-fetch' or use 'node-fetch' and polyfill globally.
Consider migrating to modern alternatives like Ky or plain fetch.
Explicitly set 'contentType' option to override serialization behavior.
To handle redirects manually, use 'fetch' directly with redirect: 'manual'.
Use 'import uberfetch from 'uberfetch'' instead of 'require'.
Install 'whatwg-fetch' or 'node-fetch' and polyfill: global.fetch = require('node-fetch').