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.
$ yarn add @tiagonapoli/http-timers-shim
On your application entrypoint add the following:
import { wrapHttpAndHttps } "@tiagonapoli/http-timer-shim"
wrapHttpAndHttps()
This package also reexport typings from @szmarczak/http-timer
:
ClientRequestWithTimings
IncomingMessageWithTimings
This way you can cast http's ClientRequest
and IncomingMessage
.