An axios wrapper library for JavaScript/TypeScript that provides built-in loading indicators, success/error prompts, request caching, request queue deduplication with configurable cancellation, and preloading support. Current stable version is 6.12.6, with active development. It simplifies common patterns like token injection via interceptors and automatic response validation. The library ships with TypeScript type definitions and supports ESM/CJS via module bundlers. Key differentiators include a single function API for all requests, a unified settings object for global defaults, and integration of UI feedback (loading, prompts) directly into the request lifecycle.
npm install wd-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates global settings configuration and a basic GET request with cache, response property filtering, and parameter merging.
Use `import wdaxios from 'wd-axios'` for the main function, and `import { setOptions } from 'wd-axios'` for configuration.Use `cache: false` or `cache: 'myCacheKey'`.
Migrate any custom loading/prompt configuration to the new `loadingStyles` and `promptStyles` properties.
Change `const wdaxios = require('wd-axios')` to `import wdaxios from 'wd-axios'`.Use `import { setOptions } from 'wd-axios'` instead of `import wdaxios from 'wd-axios'` and then destructuring.Set a base URL via `setOptions({ baseURL: 'https://api.example.com' })` or provide full URLs in requests.