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

use response.get to get just one header #1398

Closed
wants to merge 2 commits into from
Closed

use response.get to get just one header #1398

wants to merge 2 commits into from

Conversation

tinovyatkin
Copy link
Contributor

@tinovyatkin tinovyatkin commented Oct 14, 2019

It's more semantical to use response.get to get just one header and if #1392 will be merged it's also will be more performant.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1398 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1398   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files           4       4           
  Lines         382     382           
======================================
  Hits          382     382
Impacted Files Coverage Δ
lib/response.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66c1593...3820533. Read the comment docs.

@@ -201,10 +201,10 @@ module.exports = {
*/

get length() {
const len = this.header['content-length'];
const len = this.get('Content-Length');
Copy link
Member

@dead-horse dead-horse Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge this change into #1399?

@tinovyatkin tinovyatkin deleted the use-get branch October 15, 2019 00:03
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