From 9278ce202ac6d188faeff514b67f4646786efc58 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 21 May 2017 13:18:16 +0300 Subject: [PATCH] doc: update code example for Windows in stream.md PR-URL: https://github.com/nodejs/node/pull/13138 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/stream.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index a17a0c455d7bf8..aeb6c930378e4b 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -134,7 +134,7 @@ const server = http.createServer((req, res) => { res.write(typeof data); res.end(); } catch (er) { - // uh oh! bad json! + // uh oh! bad json! res.statusCode = 400; return res.end(`error: ${er.message}`); } @@ -143,12 +143,12 @@ const server = http.createServer((req, res) => { server.listen(1337); -// $ curl localhost:1337 -d '{}' +// $ curl localhost:1337 -d "{}" // object -// $ curl localhost:1337 -d '"foo"' +// $ curl localhost:1337 -d "\"foo\"" // string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o +// $ curl localhost:1337 -d "not json" +// error: Unexpected token o in JSON at position 1 ``` [Writable][] streams (such as `res` in the example) expose methods such as