From 1fc358437bdeb94316696867e14dd2c1f000bd56 Mon Sep 17 00:00:00 2001 From: Erick Hitter Date: Sun, 25 Dec 2016 13:46:14 -0800 Subject: [PATCH] No need to guess when we know we're sending JSON --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ab911ab..abf34ef 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ app.get( '/', function( req, res ) { // Get some data app.get( '/api', function( req, res ) { - res.status( 400 ).send( { error: 'Must specify a domain!' } ); + res.status( 400 ).json( { error: 'Must specify a domain!' } ); } ); app.get( '/api/:domain', function( req, res ) { -- GitLab