From f76282591721ceeccf87d9df3f2acae069cb35c5 Mon Sep 17 00:00:00 2001 From: Paul Vorbach Date: Wed, 13 Mar 2013 13:05:54 +0100 Subject: [PATCH] Add 'Content-Type' header in response (fixes #32) --- lib/restful.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/restful.js b/lib/restful.js index f9f7ca8..1225d1f 100644 --- a/lib/restful.js +++ b/lib/restful.js @@ -626,7 +626,7 @@ function _extendWithNonStrictRoutes(router, resource, options, respond) { // function respondWithResult(req, res, status, key, value) { var result; - res.writeHead(status); + res.writeHead(status, { 'Content-Type': 'application/json' }); if (arguments.length === 5) { result = {};