Permalink
Browse files

Specified the contentType for different requests to prevent errors wh…

…en clients supply their own contentTypes

#947
  • Loading branch information...
1 parent 8f986d8 commit dfa97a7e95c1a3000a4a8555b301cdc076732244 @abnanda1 abnanda1 committed Mar 15, 2013
@@ -396,6 +396,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
error: function (error) {
@@ -724,6 +725,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
success: function (data) {
@@ -821,6 +823,7 @@
url: url,
global: false,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
+ contentType: connection.ajaxDataType === "jsonp" ? "text/html; charset=UTF-8" : "application/x-www-form-urlencoded; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {
data: data
@@ -858,6 +861,7 @@
timeout: 1000,
global: false,
type: "POST",
+ contentType: "application/json; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {}
});
Oops, something went wrong.
@@ -396,6 +396,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
error: function (error) {
@@ -724,6 +725,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
success: function (data) {
@@ -821,6 +823,7 @@
url: url,
global: false,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
+ contentType: connection.ajaxDataType === "jsonp" ? "text/html; charset=UTF-8" : "application/x-www-form-urlencoded; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {
data: data
@@ -858,6 +861,7 @@
timeout: 1000,
global: false,
type: "POST",
+ contentType: "application/json; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {}
});
Oops, something went wrong.
@@ -395,6 +395,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
error: function (error) {
@@ -70,6 +70,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
success: function (data) {
@@ -167,6 +168,7 @@
url: url,
global: false,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
+ contentType: connection.ajaxDataType === "jsonp" ? "text/html; charset=UTF-8" : "application/x-www-form-urlencoded; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {
data: data
@@ -204,6 +206,7 @@
timeout: 1000,
global: false,
type: "POST",
+ contentType: "application/json; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {}
});
@@ -396,6 +396,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
error: function (error) {
@@ -724,6 +725,7 @@
global: false,
cache: false,
type: "GET",
+ contentType: "application/json; charset=UTF-8",
data: {},
dataType: connection.ajaxDataType,
success: function (data) {
@@ -821,6 +823,7 @@
url: url,
global: false,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
+ contentType: connection.ajaxDataType === "jsonp" ? "text/html; charset=UTF-8" : "application/x-www-form-urlencoded; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {
data: data
@@ -858,6 +861,7 @@
timeout: 1000,
global: false,
type: "POST",
+ contentType: "application/json; charset=UTF-8",
dataType: connection.ajaxDataType,
data: {}
});

0 comments on commit dfa97a7

Please sign in to comment.