Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/developit/redaxios
The Axios API, as an 800 byte Fetch wrapper.
https://github.com/developit/redaxios
Last synced: 25 days ago
JSON representation
The Axios API, as an 800 byte Fetch wrapper.
- Host: GitHub
- URL: https://github.com/developit/redaxios
- Owner: developit
- License: apache-2.0
- Created: 2018-08-23T22:00:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T22:45:22.000Z (about 1 year ago)
- Last Synced: 2024-10-01T11:05:20.046Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://npm.im/redaxios
- Size: 564 KB
- Stars: 4,671
- Watchers: 30
- Forks: 100
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tiny-js - redaxios - Drop-in axios replacement for modern browsers, <img align="top" height="24" src="./img/redaxios.svg"> (API Layer / Reactive Programming)
- awesome-list - redaxios
- web-stuff - redaxios - 800 byte wrapper around `fetch` to replace axios library (JS/ES6)
README
# redaxios
[Axios] has a great API that developers love. Redaxios provides that API in **800 bytes**, using native `fetch()`.
For those searching for ways to shave a few kilobytes off of their bundles, that's less than 1/5th of the size. This is made possible by using the browser's native [Fetch API][fetch], which is [supported in all modern browsers](https://caniuse.com/#feat=fetch) and polyfilled by most tools including Next.js, Create React App and Preact CLI.
### Can I just use Axios?
Yes! Axios is an excellent module and you should use it! Redaxios exists so that you can use that same API in cases where it's difficult to justify the dependency. Instead of having to choose between Axios and Fetch, Redaxios provides a middle-ground between the two.
[axios]: https://github.com/axios/axios
[fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch### Usage
```js
import axios from 'redaxios';
// use as you would normally
```Refer to the [Axios Documentation](https://github.com/axios/axios#axios-api).