@stephen-shopopop/node-metrics
    Preparing search index...

    Function buildOutgoingHttpHeaders

    • Converts a Headers object into an OutgoingHttpHeaders object suitable for use with Node.js HTTP responses.

      Iterates over all entries in the provided headers and copies them into a new object. If the content-type header is not already set, it defaults to 'text/plain; charset=UTF-8'.

      Parameters

      • headers: Readonly<Headers>

        A read-only Headers object containing HTTP header key-value pairs.

      Returns OutgoingHttpHeaders

      An OutgoingHttpHeaders object with all headers from the input and a default content-type if not present.