diff --git a/lib/https/post.js b/lib/https/post.js index f3114f3..8b061cb 100644 --- a/lib/https/post.js +++ b/lib/https/post.js @@ -14,8 +14,8 @@ module.exports = function (url, options, cb) { 'content-type': 'application/x-www-form-urlencoded', 'content-length': Buffer.byteLength(data) }; - } else if (data.json) { - data = JSON.stringify(data.json); + } else if (options.json) { + data = JSON.stringify(options.json); options.headers = { 'content-type': 'application/json', 'content-length': Buffer.byteLength(data)