Fix double-encoding typo

This commit is contained in:
SteveSandersonMS
2016-09-08 12:14:45 +01:00
parent 041d173f56
commit 411100478a
2 changed files with 2 additions and 2 deletions

View File

@@ -83,7 +83,7 @@
return; return;
} }
res.setHeader('Content-Type', 'application/json'); res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify(successValueJson)); res.end(successValueJson);
} }
else { else {
// String - can bypass JSON-serialization altogether // String - can bypass JSON-serialization altogether

View File

@@ -29,7 +29,7 @@ const server = http.createServer((req, res) => {
return; return;
} }
res.setHeader('Content-Type', 'application/json'); res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify(successValueJson)); res.end(successValueJson);
} else { } else {
// String - can bypass JSON-serialization altogether // String - can bypass JSON-serialization altogether
res.setHeader('Content-Type', 'text/plain'); res.setHeader('Content-Type', 'text/plain');