mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-12 22:35:30 +08:00
committed by
Pawel Kozlowski
parent
511422adb0
commit
b8cc71d476
@@ -64,6 +64,7 @@
|
||||
"isWindow": false,
|
||||
"isScope": false,
|
||||
"isFile": false,
|
||||
"isBlob": false,
|
||||
"isBoolean": false,
|
||||
"trim": false,
|
||||
"isElement": false,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
-isWindow,
|
||||
-isScope,
|
||||
-isFile,
|
||||
-isBlob,
|
||||
-isBoolean,
|
||||
-trim,
|
||||
-isElement,
|
||||
@@ -566,6 +567,11 @@ function isFile(obj) {
|
||||
}
|
||||
|
||||
|
||||
function isBlob(obj) {
|
||||
return toString.call(obj) === '[object Blob]';
|
||||
}
|
||||
|
||||
|
||||
function isBoolean(value) {
|
||||
return typeof value === 'boolean';
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ function $HttpProvider() {
|
||||
|
||||
// transform outgoing request data
|
||||
transformRequest: [function(d) {
|
||||
return isObject(d) && !isFile(d) ? toJson(d) : d;
|
||||
return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;
|
||||
}],
|
||||
|
||||
// default headers
|
||||
|
||||
Reference in New Issue
Block a user