A lightweight browser-based HTTP client built with TypeScript, replicating the core functionality of Axios including Promise API, request/response interceptors, data transformation, request cancellation, automatic JSON parsing, and XSS protection. Current version is 0.1.1, experimental with no stable release. Uses XMLHttpRequest under the hood for browser use only (no Node.js support). Ship TypeScript type definitions. Key differentiator: minimal educational clone of Axios intended for learning, not production.
npm install cyans-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates GET and POST requests using the default export with method, url, params, and data options.
Use a different HTTP client for Node.js (e.g., 'axios' or 'node-fetch').
Ensure method is one of: 'GET'|'get'|'DELETE'|'delete'|'HEAD'|'head'|'OPTIONS'|'options'|'POST'|'post'|'PUT'|'put'|'PATCH'|'patch'.
Manually encode param values or use a utility like query-string to build params.
Pin to a specific version and test upgrades. Consider using the official 'axios' for stability.
Use ESM import: import cyanaxios from 'cyans-axios'; or use .default: const cyanaxios = require('cyans-axios').default;Ensure you handle the returned Promise: cyanaxios({...}).then(...).catch(...);Use a complete URL string (e.g., '/api/user') relative to the page origin. For absolute URLs, ensure CORS is configured.
No dependency data recorded yet.