From 560a1f8b927099e44b75274375a690df2a05de67 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Mon, 18 Mar 2013 15:47:50 -0700 Subject: [PATCH] Set content-type on input. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 1e8ee016a..29284a1bb 100755 --- a/index.js +++ b/index.js @@ -975,10 +975,12 @@ Request.prototype.json = function (val) { if (typeof this.body === 'object') { setAcceptHeader(); this.body = safeStringify(this.body) + self.setHeader('content-type', 'application/json') } } else { setAcceptHeader(); this.body = safeStringify(val) + self.setHeader('content-type', 'application/json') } return this }