Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement response.getHeaders() #217

Merged
merged 3 commits into from
Aug 14, 2020

Conversation

sergioregueira
Copy link
Contributor

As commented in #211, I have just implemented the response.getHeaders() method (defined in OutgoingMessage).

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.

@sergioregueira
Copy link
Contributor Author

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).

@eugef
Copy link
Owner

eugef commented Aug 12, 2020

Hi @sergioregueira , thanks for the PR. it looks good to me.
Please go ahead and do the changes in unit tests.

@sergioregueira
Copy link
Contributor Author

Unit tests changed. Take a look at the other pull request before merging this one to fix the non related CI errors.

@eugef
Copy link
Owner

eugef commented Aug 13, 2020

@sergioregueira could you rebase your branch against the latest master - the build should become green

@sergioregueira
Copy link
Contributor Author

Branch rebased and eslint errors fixed.

@eugef eugef merged commit e803c30 into eugef:master Aug 14, 2020
@eugef
Copy link
Owner

eugef commented Aug 14, 2020

Great, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants