From 126458602e17d72a279d857abe80d4287698694b Mon Sep 17 00:00:00 2001 From: Jason Adams Date: Mon, 22 Apr 2013 11:20:53 -0300 Subject: [PATCH] Added x-www-form-urlencoded headers for PUT requests --- lib/helpers/call.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/call.js b/lib/helpers/call.js index 969ad1a..4a73769 100644 --- a/lib/helpers/call.js +++ b/lib/helpers/call.js @@ -43,7 +43,7 @@ module.exports = function call(_config, _assert, _test, _responses) { if (data && typeof data === 'object') { data = require('querystring').stringify(data); - if (req.method === 'POST') { + if (req.method === 'POST' || req.method === 'PUT') { headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded'; } }