Timeout handling in dotnet core API

278 Views Asked by At

My angular application is consuming dotnet core API. My API is comsuming other APIs to send response. Sometimes, the other APIs I'm consuming takes too long to respond. Thus, I dont want my angular application to keeps waiting for too long. I want to create a timeout middleware which returns, i dont know, a response saying "Request Timeout" or something for all the requests that takes more than 3-4 seconds.

I'm using dotnet core 2.2.

0

There are 0 best solutions below