aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ng/http.js4
-rw-r--r--test/ng/httpSpec.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/http.js b/src/ng/http.js
index 19b7d246..0dd4deef 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -111,8 +111,8 @@ function $HttpProvider() {
'Accept': 'application/json, text/plain, */*',
'X-Requested-With': 'XMLHttpRequest'
},
- post: {'Content-Type': 'application/json'},
- put: {'Content-Type': 'application/json'}
+ post: {'Content-Type': 'application/json;charset=utf-8'},
+ put: {'Content-Type': 'application/json;charset=utf-8'}
}
};
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js
index 9c01db65..bb4de3c1 100644
--- a/test/ng/httpSpec.js
+++ b/test/ng/httpSpec.js
@@ -384,7 +384,7 @@ describe('$http', function() {
$httpBackend.expect('POST', '/url', 'messageBody', function(headers) {
return headers['Accept'] == 'application/json, text/plain, */*' &&
headers['X-Requested-With'] == 'XMLHttpRequest' &&
- headers['Content-Type'] == 'application/json';
+ headers['Content-Type'] == 'application/json;charset=utf-8';
}).respond('');
$http({url: '/url', method: 'POST', headers: {}, data: 'messageBody'});
@@ -396,7 +396,7 @@ describe('$http', function() {
$httpBackend.expect('PUT', '/url', 'messageBody', function(headers) {
return headers['Accept'] == 'application/json, text/plain, */*' &&
headers['X-Requested-With'] == 'XMLHttpRequest' &&
- headers['Content-Type'] == 'application/json';
+ headers['Content-Type'] == 'application/json;charset=utf-8';
}).respond('');
$http({url: '/url', method: 'PUT', headers: {}, data: 'messageBody'});