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.
Converts a
Headersobject into anOutgoingHttpHeadersobject suitable for use with Node.js HTTP responses.Iterates over all entries in the provided
headersand copies them into a new object. If thecontent-typeheader is not already set, it defaults to'text/plain; charset=UTF-8'.