Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Fixing JSON/XML bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danbim committed Dec 4, 2013
1 parent d446d22 commit 9cfeb9e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/wisebed.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,16 +541,19 @@ var Wisebed = function(baseUri, webSocketBaseUri) {

this.getWiseML = function(experimentId, callbackDone, callbackError, jsonOrXml, callbackComplete) {

var dataType = (!jsonOrXml ? "json" : jsonOrXml);
var url = (experimentId ?
getBaseUri() + "/experiments/" + encodeURIComponent(experimentId) + "/network." + dataType :
getBaseUri() + "/experiments/network." + dataType);

$.ajax({
url : (experimentId ?
getBaseUri() + "/experiments/" + experimentId + "/network" :
getBaseUri() + "/experiments/network"),
url : url,
cache : false,
context : document.body,
success : callbackDone,
error : callbackError,
complete : callbackComplete,
dataType : (!jsonOrXml ? "json" : jsonOrXml),
dataType : dataType,
xhrFields: { withCredentials: true }
});
};
Expand Down

0 comments on commit 9cfeb9e

Please sign in to comment.