0

I need to do angular $http request from client project to route in node js(server project),this request is long time request its supposed to take 10 min or something like this.

The problem is that the client call the server side, and the client stops to wait to answer after 3 min,before the Node.js procedure finish. I tried to set the angular $http request timeout to 1000000 but isn't working.

here is my code:

var deferred = this.q.defer();

var options = {
  method: "GET",
  timeout: 1000000,
  url: that.serverUrl + "excel" + that.urlParameterGet(true),
  responseType: 'blob'
};

this.http(options).then(function(data) {
  deferred.resolve(data);
}, function(error) {
  deferred.resolve(error);
});

return deferred.promise;

can someone help? thanks

2
  • 1
    Try to raise the keep alive param on the server: stackoverflow.com/questions/12651466/… Commented Aug 2, 2016 at 12:46
  • Its working, thank you Commented Aug 2, 2016 at 13:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.