Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axios-time

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-time

Axios plugin to measure the actual time it takes for a request to complete

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
880
decreased by-60.94%
Maintainers
1
Weekly downloads
 
Created
Source

npm

axios-time

Axios plugin to measure the actual time it takes for a request to complete

Installation

You can install this plugin using NPM

> npm i axios-time

Basic Usage

The example below will add timing data to the request-response cycle.

const axios = require('axios');
const axiosTime = require('axios-time');

axiosTime(axios);

try {
    const response = await axios.get('/user');
} catch(err) {
}

response.timings object example:

{
  "timingEnd": 1599035291441,   // Timestamp of the start of the request (in Unix Epoch milliseconds).
  "timingStart": 1599035289182, // Timestamp when the response ended (in Unix Epoch milliseconds).
  "elapsedTime": 2259           // Duration of the entire request/response in milliseconds.
}

FAQs

Package last updated on 02 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc