I have the following piece of code:
jQuery.ajax({
type: "GET",
url: "http://localhost:8081/myservicethatcontainsazipfile",
contentType:'application/zip',
success: function (response) {
console.log("Successful");
},
error: function (xhr, ajaxOptions, thrownError) {
console.log("Error.");
}
});
According to AJAX specifications, you can't download a file directly to the computer (security reasons), so I would like to know how can I download this file directly from the client without having to create and click an html element and similar options?