We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7ab1ba commit 82329b6Copy full SHA for 82329b6
doc/api/stream.md
@@ -130,15 +130,14 @@ const server = http.createServer( (req, res) => {
130
req.on('end', () => {
131
try {
132
const data = JSON.parse(body);
133
+ // write back something interesting to the user:
134
+ res.write(typeof data);
135
+ res.end();
136
} catch (er) {
137
// uh oh! bad json!
138
res.statusCode = 400;
139
return res.end(`error: ${er.message}`);
140
}
-
- // write back something interesting to the user:
- res.write(typeof data);
141
- res.end();
142
});
143
144
0 commit comments