I'm making an HTTP request and I want to use timeout for alerting the user.
The end goal is to give the user 2 messages- one after 5 second delay and another after 5 more seconds(10 second since the HTTP request was sent).
Ideally it should look something like this:
Observable.fromPromise(SendHTTPRequest)
.timout(5000).subscribe(null,timeout => console.log("It's been 5 seconds"));
.timout(5000).subscribe(null,timeout => console.log("It's been 10 seconds"));
off course this code can't be done so my question is how can it be done :)
Thanks!