Skip to content
Browse files

Added defaultContentType property to the signalR object.

- This also included making a private object off of signalR

#947, #1745
  • Loading branch information...
1 parent e428b1e commit ff5f2cec78cd08276645499cff014a7a19b66096 @NTaylorMullen NTaylorMullen committed with NTaylorMullen Mar 26, 2013
View
6 src/Microsoft.AspNet.SignalR.Client.JS/jquery.signalR.core.js
@@ -119,6 +119,10 @@
return new signalR.fn.init(url, qs, logging);
};
+ signalR._ = {
+ defaultContentType: "application/x-www-form-urlencoded; charset=UTF-8"
+ };
+
signalR.events = events;
signalR.changeState = changeState;
@@ -333,7 +337,7 @@
}
}
- connection.contentType = "application/x-www-form-urlencoded; charset=UTF-8";
+ connection.contentType = signalR._.defaultContentType;
}
connection.ajaxDataType = config.jsonp ? "jsonp" : "json";
View
3 src/Microsoft.AspNet.SignalR.Client.JS/jquery.signalR.transports.common.js
@@ -7,6 +7,7 @@
"use strict";
var signalR = $.signalR,
+ signalRPrivate = $.signalR._,
events = $.signalR.events,
changeState = $.signalR.changeState;
@@ -173,7 +174,7 @@
url: url,
global: false,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ contentType: signalRPrivate.defaultContentType,
dataType: connection.ajaxDataType,
data: {
data: data

0 comments on commit ff5f2ce

Please sign in to comment.
Something went wrong with that request. Please try again.