A plugin for integrating Axios into Egg.js applications. Version 1.1.6 wraps Axios to provide a convenient `ctx.http` API for making HTTP requests within Egg.js context. It supports GET, POST, and other methods with built-in URL parameter handling (e.g., `/user/:id`). The plugin is minimal and relies on Axios's documentation for full feature details. It has not been updated recently and is suitable for simple integrations, but lacks TypeScript typings and modern ESM support.
npm install egg-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a full Egg.js setup: enabling the plugin, configuring default headers and timeout, and using ctx.http.get in a controller with error handling.
Consider using a more active Egg.js HTTP plugin like egg-axios-plus or implement Axios manually in a service.
If you need full response details, use Axios directly instead of this plugin.
Define custom types or use a plugin that includes types.
Pin Axios version to v0.x if using this plugin, or upgrade to a maintained alternative.
Create a wrapper service that configures an Axios instance with interceptors yourself.
Add `http: { enable: true, package: 'egg-axios' }` to config/plugin.jsRun `npm install egg-axios --save` and ensure plugin is correctly configured
Use `await ctx.http.get(url, params)` or `await ctx.http.post(url, data)`