diff --git a/doc/api/https.md b/doc/api/https.md index c2231dca1830e5..355fd7b133a76d 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -158,11 +158,11 @@ var req = https.request(options, (res) => { process.stdout.write(d); }); }); -req.end(); req.on('error', (e) => { console.error(e); }); +req.end(); ``` The options argument has the following options