i want to create an observable which handle these:
- observable
- http request
- Response
- wait 5 sec and do the request again.
My current function:
getData (): Observable<CurrentData> {
return interval(5000)
.pipe(
flatMap(() => "HTTP REQUEST",
),
map(this.extractData, this))
}
but my function are not waiting for the successfull response, my function tries the request every 5 sec.