• Version 5.0.1
  • Published
  • 10.2 kB
  • 1 dependency
  • MIT license


npm i @szmarczak/http-timer
yarn add @szmarczak/http-timer
pnpm add @szmarczak/http-timer


Timings for HTTP requests



function timer

timer: (request: ClientRequestWithTimings) => Timings;


    interface ClientRequestWithTimings

    interface ClientRequestWithTimings extends ClientRequest {}

      property timings

      timings?: Timings;

        interface IncomingMessageWithTimings

        interface IncomingMessageWithTimings extends IncomingMessage {}

          property timings

          timings?: Timings;

            interface Timings

            interface Timings {}

              property abort

              abort?: number;

                property connect

                connect?: number;

                  property end

                  end?: number;

                    property error

                    error?: number;

                      property lookup

                      lookup?: number;

                        property phases

                        phases: {
                        wait?: number;
                        dns?: number;
                        tcp?: number;
                        tls?: number;
                        request?: number;
                        firstByte?: number;
                        download?: number;
                        total?: number;

                          property response

                          response?: number;

                            property secureConnect

                            secureConnect?: number;

                              property socket

                              socket?: number;

                                property start

                                start: number;

                                  property upload

                                  upload?: number;

                                    Package Files (1)

                                    Dependencies (1)

                                    Dev Dependencies (12)

                                    Peer Dependencies (0)

                                    No peer dependencies.


                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@szmarczak/http-timer.

                                    • Markdown
                                    • HTML
                                      <a href="https://www.jsdocs.io/package/@szmarczak/http-timer"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>