text: 
  var m=window.mljs||{};var b=m.bindings||{};m.bindings=b;b.jquery=function(){$.ajaxSetup({contentType:'application/json',processData:false});};b.jquery.prototype.supportsAdmin=function(){return false;};b.jquery.prototype.configure=function(username,password,logger){this.logger=logger;};b.jquery.prototype.request=function(reqname,options,content,callback){var self=this;var data=null;if(undefined!=content&&null!=content){console.log("content typeof: "+(typeof content));if("ArrayBuffer"==typeof content){data=content;}else if("object"==typeof content){data=JSON.stringify(content);}else if("string"==typeof content){data=content;}}
  var ct=options.contentType;if(undefined==ct){ct="application/json";}
  if(null!=content&&undefined!=content&&-1!=options.path.indexOf("&format=binary")){var xhr=new XMLHttpRequest();xhr.open(options.method,options.path,true);xhr.onload=function(e){var res={};res.inError=false;res.statusCode=xhr.status;var wibble;if(undefined!=data&&null!=data){self.logger.debug("Data type: "+(typeof data));self.logger.debug("Data value: "+data);var xml=xhr.responseXML;if(undefined!=xml){res.format="xml";res.doc=xml;}else{self.logger.debug("response text: "+xhr.responseText);try{self.logger.debug("parsing xhr.responseText");wibble=$.parseJSON(xhr.responseText);res.format="json";self.logger.debug("js raw: "+wibble);self.logger.debug("json str: "+JSON.stringify(wibble));self.logger.debug("Parsed JSON successfully");}catch(ex){self.logger.debug("JSON parsing failed. Trying XML parsing.");try{wibble=textToXML(xhr.responseText);res.format="xml";}catch(ex2){self.logger.debug("Not JSON or XML. Exception: "+ex2);}}}}
  res.doc=wibble;callback(res);};xhr.send(content);}else{var dataType="json";if("application/xml"==ct){dataType="xml";}else if("text/plan"==ct){dataType="text";}
  $.ajax(options.path,{contentType:ct,type:options.method.toLowerCase(),data:data,processData:false,dataType:dataType,converters:{"* text":window.String,"text html":true,"text json":window.String,"text xml":jQuery.parseXML},success:function(data,textStatus,xhr){console.log("jquery success");var res={};res.inError=false;res.statusCode=xhr.status;var wibble;if(undefined!=data&&null!=data){self.logger.debug("Data type: "+(typeof data));self.logger.debug("Data value: "+data);var xml=xhr.responseXML;if(undefined!=xml){res.format="xml";res.doc=xml;}else{self.logger.debug("response text: "+xhr.responseText);try{self.logger.debug("parsing xhr.responseText");wibble=$.parseJSON(xhr.responseText);res.format="json";self.logger.debug("js raw: "+wibble);self.logger.debug("json str: "+JSON.stringify(wibble));self.logger.debug("Parsed JSON successfully");}catch(ex){self.logger.debug("JSON parsing failed. Trying XML parsing.");try{wibble=textToXML(xhr.responseText);res.format="xml";}catch(ex2){self.logger.debug("Not JSON or XML. Exception: "+ex2);}}}}
  res.doc=wibble;callback(res);},error:function(xhr,textStatus,errorThrown){console.log("jquery error");var res={};if(xhr.status==303){res.location=xhr.getResponseHeader("location");}
  res.inError=true;res.statusCode=xhr.status;res.doc=xhr.responseXML;if(undefined==res.doc){res.doc=xhr.responseText;res.format="text";try{self.logger.debug("parsing xhr.responseText");var wibble=$.parseJSON(xhr.responseText);res.format="json";self.logger.debug("js raw: "+wibble);self.logger.debug("json str: "+JSON.stringify(wibble));self.logger.debug("Parsed JSON successfully");res.doc=wibble;}catch(ex){self.logger.debug("Exception: "+ex);}}else{res.format="xml";}
  res.details=res.doc;if("string"==typeof res.details){res.details=textToXML(res.details);}
  if(undefined!=res.details.nodeType){res.details=xmlToJson(res.details);}
  callback(res);}});}};