Answer the question
In order to leave comments, you need to log in
Get pdf file with POST request via jquery.ajax()?
Actually, how can you get a pdf file from the server through a post request using $.ajax()?
I'm trying to make a request like this:
$.ajax({
type: 'POST',
dataType: '???', // какой нужно вставить правильный dataType?
url: url,
data: formData,
success: function (data) {
console.log(data);
},
error: function (data) {
console.log(data);
}
});
Answer the question
In order to leave comments, you need to log in
Leave those blank, it will automatically determine by MIME from the server, the main thing is that the server would correctly give MIME.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question