@tiagonapoli/http-timer-shim
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    3

Package Sidebar

Install

npm i @tiagonapoli/http-timer-shim

Weekly Downloads

3

Version

0.0.1

License

none

Unpacked Size

3.38 kB

Total Files

5

Last publish

Collaborators

  • tiagonapoli