0.0.1 • Published 5 years ago
@tiagonapoli/http-timer-shim v0.0.1
@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-shimUsage
On your application entrypoint add the following (before every import):
import "@tiagonapoli/http-timer-shim"This package also reexport typings from @szmarczak/http-timer:
ClientRequestWithTimingsIncomingMessageWithTimings
This way you can cast http's ClientRequest and IncomingMessage.
0.0.1
5 years ago