{"id":49119,"library":"redaxios","title":"redaxios","description":"A tiny, 800-byte wrapper around the native Fetch API that provides the same API as Axios. Version 0.5.1 is the latest stable release. It is designed as a lightweight alternative to Axios for modern browsers and environments where Fetch is available. Unlike Axios, it has no built-in progress events, no automatic JSON parsing for errors, and no support for older browsers without a fetch polyfill. It is best suited for reducing bundle size when full Axios is not needed.","status":"active","version":"0.5.1","language":"javascript","source_language":"en","source_url":"https://github.com/developit/redaxios","tags":["javascript","axios","fetch","typescript"],"install":[{"cmd":"npm install redaxios","lang":"bash","label":"npm"},{"cmd":"yarn add redaxios","lang":"bash","label":"yarn"},{"cmd":"pnpm add redaxios","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require() will fail unless using a bundler that handles ESM.","wrong":"const axios = require('redaxios')","symbol":"default (axios)","correct":"import axios from 'redaxios'"},{"note":"Only default export is provided; named exports like create do not exist.","wrong":"import { create } from 'redaxios'","symbol":"use default export as function to create instance","correct":"import axios from 'redaxios'; const instance = axios.create({ baseURL: 'https://api.example.com' })"},{"note":"TypeScript types are bundled with the package; reuse types from Axios for consistency.","wrong":null,"symbol":"type imports (TypeScript)","correct":"import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'redaxios'"}],"quickstart":{"code":"import axios from 'redaxios';\n\nasync function main() {\n  const response = await axios.get('https://api.github.com/repos/developit/redaxios');\n  console.log(response.data);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Fetches repository info from GitHub using the Axios-like API provided by redaxios."},"warnings":[{"fix":"Manually parse error responses with try-catch and JSON.parse() if needed.","message":"Error responses may not include a parsed JSON body like Axios does; the data property may be a string or undefined.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pass an AbortSignal via the signal option in the request config.","message":"No support for request cancellation via CancelToken; use AbortController instead.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Fall back to using fetch directly if progress events are required.","message":"No progress event support (e.g., onUploadProgress).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Include a fetch polyfill like whatwg-fetch and ensure Promise support.","message":"Old environment? You must polyfill fetch and Promise yourself.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.5.1':20 '800':4 'altern':32 'api':11,16 'around':7 'automat':55 'avail':43 'axio':18,34,45,80,85 'best':72 'browser':37,65 'built':50 'built-in':49 'bundl':76 'byte':5 'design':28 'environ':39 'error':59 'event':53 'fetch':10,41,68,86 'full':79 'javascript':84 'json':56 'latest':23 'lightweight':31 'modern':36 'nativ':9 'need':83 'older':64 'pars':57 'polyfil':69 'progress':52 'provid':13 'redaxio':1 'reduc':75 'releas':25 'size':77 'stabl':24 'suit':73 'support':62 'tini':3 'typescript':87 'unlik':44 'version':19 'without':66 'wrapper':6","created_at":"2026-06-07T17:00:09.103642+00:00","updated_at":"2026-06-07T17:00:09.103642+00:00","problems":[{"fix":"Run 'npm install redaxios' and ensure import statement is correct.","cause":"Missing installation or incorrect import path","error":"Error: Cannot find module 'redaxios'"},{"fix":"Use 'import axios from 'redaxios'' instead of '{ axios }'.","cause":"Using named imports instead of default import","error":"TypeError: axios.get is not a function"},{"fix":"Use Node.js version 18+ or install a fetch polyfill like 'node-fetch'.","cause":"Running in a non-browser environment or older Node.js without fetch support","error":"Uncaught ReferenceError: fetch is not defined"},{"fix":"Check the response object shape and handle non-JSON responses manually.","cause":"Assuming Axios behavior where error responses always have a data property","error":"Cannot read property 'data' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/developit/redaxios","github":"https://github.com/developit/redaxios","docs":null,"changelog":null,"pypi":null,"npm":"redaxios","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}