A lightweight wrapper around axios (v0.21.4) that integrates response message prompts via the web-message library (v0.0.9) and provides request debouncing. The current version is 0.5.2, with no clear release cadence. It adds a config extension to axios for debouncing, data key extraction, and global request/response callbacks. Ships TypeScript types. Primarily for browser environments with UI component libraries that support web-message.
npm install common-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Axios instance with debouncing, custom data key extraction, and web-message integration.
Replace 'createAxiosInstance' with 'createAxios' in imports.
Rename 'messageHoverStop' to 'messagePauseOnHover' in config.
Run 'npm install axios@^0.21.4 web-message@0.0.9' to install peer dependencies.
Ensure 'dataKey' matches the actual nested path in your API response.
Install it: npm install web-message@0.0.9
Use: import { createAxios } from 'common-axios'Import web-message before using common-axios: import 'web-message'
Use the provided 'WebMessageAxiosRequestConfig' type from 'common-axios'