@tiagonapoli/http-timer-shim
v0.0.1
Published
Add timers to your http(s) requests
Downloads
70
Readme
@tiagonapoli/http-timer-shim
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
.