marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.01k stars 795 forks source link

Ch. 20, 'The HTTP module' part. #406

Closed Spiralfate closed 6 years ago

Spiralfate commented 6 years ago

There is a code snippet in making client's request article:

const {request} = require("http"); let requestStream = http.request({ ...

Is it just me, or it should be just: 'let requestStream = request({' since we have already extracted 'http.request' function and made it a value of 'request' binding? Thanks

marijnh commented 6 years ago

You're right. Attached patch fixes that.