Javascript 将xml作为数据参数发送到jQuery中的GET方法?

Javascript 将xml作为数据参数发送到jQuery中的GET方法?,javascript,c#,jquery,ajax,xml,Javascript,C#,Jquery,Ajax,Xml,我有一个jquery ajax调用: $.ajax({ context: this, contentType: 'application/json; charset=utf-8', type: "GET", url: "/api/upload?mathml=" + mathml + "&fileName=math", //+ Utility.getRandomInt(1, 100), dataType: "json", beforeSen

我有一个jquery ajax调用:

$.ajax({
    context: this,
    contentType: 'application/json; charset=utf-8',
    type: "GET",
    url: "/api/upload?mathml=" + mathml + "&fileName=math", //+ Utility.getRandomInt(1, 100),
    dataType: "json",

    beforeSend: function (jqXHR, settings) {
        console.log("Sending request to generate image...");
    },

    success: function (data, textStatus, jqXHR) {
        img = result;
        tinymce.activeEditor.insertContent('<img alt="MathML (base64):' + window.btoa(mathml) + '" src="' + img + '"/>');
        console.log("Success: " + textStatus);
        editor.windowManager.close();
    },

    error: function (jqXHR, textStatus, errorThrown) {
        console.log("Error: " + textStatus + ". Error: " + errorThrown + " ");
    }
});
$.ajax({
背景:这,,
contentType:'application/json;charset=utf-8',
键入:“获取”,
url:“/api/upload?mathml=“+mathml+”&fileName=math”、//+Utility.getRandomInt(1100),
数据类型:“json”,
发送前:函数(jqXHR,设置){
log(“发送生成图像的请求…”);
},
成功:函数(数据、文本状态、jqXHR){
img=结果;
tinymce.activeEditor.insertContent(“”);
console.log(“成功:+textStatus”);
editor.windowManager.close();
},
错误:函数(jqXHR、textStatus、errorshown){
log(“错误:+textStatus+”。错误:+errorshown+”);
}
});
我将url中的原始xml/mathml发送给GET方法。由于字符“get converted to url characters with”%”前面有“%”,因此找不到该页时出错

是否有一些jQuery/JavaScript函数可以执行此操作,或者我应该在C#中将服务器端的这些字符转换回“”吗


注意:我正在VisualStudio2010中开发MVC4/C#web应用程序

你为什么不改用邮局呢?