0.0.1 • Published 4 years ago

@tiagonapoli/http-timer-shim v0.0.1

Weekly downloads
36
License
-
Repository
-
Last release
4 years ago

@tiagonapoli/http-timer-shim

Version

This simple package was built on top of @szmarczak/http-timer.

Unfortunately, axios, unlike got, doesn't have request timings. I'm stuck with axios in some projects, so I did this shim wrapping http(s) request method and adding timers to them.

Install

$ yarn add @tiagonapoli/http-timers-shim

Usage

On your application entrypoint add the following (before every import):

import "@tiagonapoli/http-timer-shim"

This package also reexport typings from @szmarczak/http-timer:

  • ClientRequestWithTimings
  • IncomingMessageWithTimings

This way you can cast http's ClientRequest and IncomingMessage.

0.0.1

4 years ago