Permalink
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 8d7fd59 commit 233fe3f5db6229ebd99355db11a87060ede8e723 @NTaylorMullen NTaylorMullen committed Mar 26, 2013
@@ -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;
@@ -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 233fe3f

Please sign in to comment.