I have an application that communicates with the server using ajax calls with jquery. However, in some cases, the time for callback ends up being too long. I would like to know if there is a possibility of receiving information with the requisition status (in percentage), until it is complete. Here is an example of the code used:
$.ajax({
type: "POST",
url: metodo_url,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
console.log("Sucesso: " + result.d);
},error: function (xmlHttpRequest, textStatus, errorThrown) {
console.log("Erro: " + xmlHttpRequest);
}
});
NOTE: I came to find a way to return the percentage of the call process, however, this was about uploading the information (useful in the case of sending parameters and / or files), not processing as a whole.