Skip to content

Commit a8d84d5

Browse files
atrioomaddaleax
atrioom
authored andcommitted
doc: changed order of invocations in https.request() example.
When you call req.end() before you add .on listeners you get an Error that you can't call .on on undefined. PR-URL: #9614 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent c7cd400 commit a8d84d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/https.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ var req = https.request(options, (res) => {
158158
process.stdout.write(d);
159159
});
160160
});
161-
req.end();
162161

163162
req.on('error', (e) => {
164163
console.error(e);
165164
});
165+
req.end();
166166
```
167167

168168
The options argument has the following options

0 commit comments

Comments
 (0)