Created
September 2, 2016 01:35
-
-
Save IEvangelist/13ea00dd35513834b4763a188e42ca43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If this call fails, we'll try it again with the same payload two times | |
getFooBars(onNext: (fooBars: FooBar[]) => void) { | |
this.get("api/foobar") | |
.map(response => <FooBar[]>response.json()) | |
.retry(2) | |
.subscribe(onNext, | |
error => | |
console.log("An error occurred when requesting api/foobar.", error)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment