Lightweight plugin for axios that adds timing data (start/end timestamps and elapsed time) to every HTTP request response. Version 1.0.0, stable and unmaintained since 2020. No longer actively developed; alternative is to use axios built-in request/response interceptors or libraries like axios-timelog. Works only with axios instances or globally patched axios.
npm install axios-timeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates the plugin's usage: require both axios and axios-time, call axiosTime(axios) once, then make a request and access response.timings.
Consider implementing your own timing via axios interceptors or use a maintained alternative.
Create separate axios instances with `axios.create()` and apply the plugin to each as needed.
Handle success and error separately or wrap in try-catch to inspect err.response?.timings.
Use process.hrtime.bigint() for high-precision custom timing instead.
Use `const axiosTime = require('axios-time');` instead of `import axiosTime from 'axios-time';`Access timings only on successful responses or use `err.response?.timings` in the catch block.
Call `axiosTime(axios);` at the start of your application, passing the same axios instance you use.