我正在使用 Freshchat Smart Plugs 脚本,如下所示:
<script>
var makeRequest = function() {
jQuery.ajax({
method: "POST",
url: "/app/extension_proxy",
processData: false,
data: JSON.stringify({
header: { "Authorization": "Basic " + btoa('API KEY' + ":" + 'X') },
url: "https://domian.freshdesk.com/api/v2/tickets/2",
method : "GET"
}),
success: function(data) {
console.log(data);
},
});
};
makeRequest();
</script>
如果我使用字符串而不是脚本,它将显示在那里。