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.