2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Fixing issue #3

This commit is contained in:
mzabriskie
2014-09-16 18:23:31 -06:00
parent 3950ceea21
commit e1aa04ccee
3 changed files with 38 additions and 1 deletions
+5
View File
@@ -20,6 +20,11 @@ module.exports = function httpAdapter(resolve, reject, config) {
config.headers || {}
);
// Add Content-Length header if data exists
if (data) {
headers['Content-Length'] = data.length;
}
// Parse url
var parsed = url.parse(config.url);
var options = {
+1 -1
View File
@@ -14,7 +14,7 @@ module.exports = {
return utils.isObject(data) &&
!utils.isFile(data) &&
!utils.isBlob(data) ?
JSON.stringify(data) : null;
JSON.stringify(data) : data;
}],
transformResponse: [function (data) {