Closed sergioregueira closed 4 years ago
Furthermore, if you agree, I would like to replace the references in unit tests to response._getHeaders()
(flagged as deprecated in 2.0) with response.getHeaders()
(excluding the specific tests of that method).
Hi @sergioregueira , thanks for the PR. it looks good to me. Please go ahead and do the changes in unit tests.
Unit tests changed. Take a look at the other pull request before merging this one to fix the non related CI errors.
@sergioregueira could you rebase your branch against the latest master - the build should become green
Branch rebased and eslint errors fixed.
Great, thanks
As commented in #211, I have just implemented the
response.getHeaders()
method (defined inOutgoingMessage
).Node.js specification says the method returns a shallow copy, so I serialize and parse the internal
_headers
object before returning it to avoid additional dependencies.