2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

Fixing failing tests

This commit is contained in:
mzabriskie
2014-09-22 10:47:41 -06:00
parent 77bed7c8ab
commit f406b092fc
5 changed files with 34 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ module.exports = {
}
if (utils.isObject(data) && !utils.isFile(data) && !utils.isBlob(data)) {
// Set application/json if no Content-Type has been specified
if (utils.isUndefined(headers['Content-Type'])) {
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
headers['Content-Type'] = 'application/json;charset=utf-8';
}
return JSON.stringify(data);