Frest is a browser REST client that wraps the Fetch API with an XMLHttpRequest fallback for environments where Fetch is unavailable or for file upload/download with progress events. Version 1.2.0 is current and stable. Key differentiators include interceptor support (before request, after response, and error), CRUD aliases, TypeScript definitions, and UMD builds for direct script tag usage. It is a lightweight alternative to axios with built-in XHR fallback.
npm install frestNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to make a GET request with frest, handle the response, and parse JSON.
Use res.origin.json() or add a response interceptor to parse automatically.
Use frest.create({ base: '...', headers: ... }) to set custom headers.Ensure XMLHttpRequest is available or use polyfills.
Use frest.create() to get a new instance instead of new frest()
Use frest.create() to create a new instance.
Run 'npm install frest' and ensure import is correct: import frest from 'frest'
Access the native response via res.origin to use standard Fetch properties.
No dependency data recorded yet.