Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: changed order of invocations in example.
When you call req.end() before you add .on listeners you get an Error that you can't call .on on undefined.
  • Loading branch information
atrioom authored Nov 15, 2016
commit ef7e3ac432853871c96dd7db642a1700c95ba32b
3 changes: 2 additions & 1 deletion doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ var req = https.request(options, (res) => {
process.stdout.write(d);
});
});
req.end();

req.on('error', (e) => {
console.error(e);
});
req.end();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need for this blank line.

```

The options argument has the following options
Expand Down