Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update doc/api/http.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
hassaanp and aduh95 authored Apr 2, 2021
commit 3b346d40c285676f567f99f72432c181901ac26b
6 changes: 3 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2759,9 +2759,9 @@ http.get('http://localhost:8000/', (res) => {
// Create a local server to receive data from
const server = http.createServer((req, res) => {
res.writeHead(200, { 'content-type': 'application/json' });
Comment thread
hassaanp marked this conversation as resolved.
Outdated
res.end(`{
'data': 'hello world'
}`);
res.end(JSON.stringify({
data: 'Hello World!'
}));
});

server.listen(8000);
Expand Down