From 10f80d7d2918f98262090b425ecc294d9518aa7e Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 7 Jun 2012 17:10:39 -0700 Subject: fix($http): add utf-8 to default Content-Type header (post/put) This fixes special characters issue with MongoLab. https://groups.google.com/d/topic/angular/1T6h7bfZ7Rs/discussion --- src/ng/http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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'} } }; -- cgit v1.2.3