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 60448914029e164451db38360c73b4932a3eb5ba @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;
@@ -333,7 +337,7 @@
}
}
- connection.contentType = "application/x-www-form-urlencoded; charset=UTF-8";
+ connection.contentType = signalR._.defaultContentType;
}
connection.ajaxDataType = config.jsonp ? "jsonp" : "json";
@@ -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 6044891

Please sign in to comment.