Observable.interval(3000)
.do(value => console.log('attempt #', value))
.switchMap(() => Observable.defer(() => this.http.get(url))
.map(data => data)
.catch(err => console.log(err))
)
.catch (err => Observable.empty())
.subscribe(data => console.log(data));