1
I have an application that communicates with the server using ajax calls with jquery. However, in some cases, the time for the return of the call ends up being too long. I would like to know if there is the possibility of receiving information with the status of the request (in percentage), until it is complete. Below 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 related to the upload of information (useful in the case of sending parameters and/or files), and not the processing as a whole.