Angular 2 HTTP request run again with rxjs and retry()


A failed request you can ask very comfortable again with the method retry():

import 'rxjs/add/operator/retry';

...

const result = this.http.get(url)
.retry(2);

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>