Double request on very time-consuming request

0

I have a problem, on my server I have a process that is very time consuming, but this is expected, the problem is that since this request takes up to 2 minutes, some browsers are resending the request. I use angularjs on my front, I can not tell if this is the behavior of the browser or the Framework. What would be the treatment for this, prevent the browser or angular resend the request because of the delay in response.

        var _getVendas = function (data) {
        var _deferred = $q.defer();
        $http.get(API_CONFIG.url + '/api/orders/conferencia/?dateStart=' + data.dateStart + '&dateEnd=' + data.dateEnd)
            .success(function (data) {
                _deferred.resolve(data);
            })
            .error(function (error, status) {
                _deferred.reject(error);
            });
        return _deferred.promise;
    }
    
asked by anonymous 08.05.2018 / 14:10

0 answers