How to increase HTTP request timeout more than 2 minutes in Angular 7?

13,802

I didn't get a reply from you in the comments, but I was having this exact issue on my dev machine, and maybe that's happening to you as well.

I was using the proxy config, and the proxy's default timeout is 120 seconds (2 minutes). So, if that's your case, simply define a higher value in the configuration.

{
  "/api": {
    "target": "http://localhost:3000",
    "secure": false,
    "timeout": 360000
  }
}
Share:
13,802

Related videos on Youtube

Ahmad Tamimi
Author by

Ahmad Tamimi

Updated on June 04, 2022

Comments