0

I got a typescript code which uses fetch to make a long running http request. The request can sometime take a while and I don't want a 504 gateway timeout to be thrown after the default timeout.

Is there a way to increase the time until a 504 error is thrown if no response is received for a fetch call?

CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
  • @Fraction No. That question describes how to set a timeout for the request so it won't take too long. I want to do the exact opposite - increase the inner timeout of the request so it won't throw a 504 error after it waits for a reply which doesn't arrive and make it keep waiting – CodeMonkey Jun 08 '23 at 09:34
  • You can use polling, but I think WebSocket would be a better choice – Fraction Jun 08 '23 at 12:02

0 Answers0