Skip to content

Commit

Permalink
Set content-type on input.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Mar 18, 2013
1 parent a9f1896 commit 560a1f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Expand Up @@ -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
}
Expand Down

0 comments on commit 560a1f8

Please sign in to comment.