Last active
September 16, 2018 09:16
-
-
Save mateuszgachowski/504cc3ce64a6f32c669a1f61cd77474c to your computer and use it in GitHub Desktop.
Small lib for making smart requests
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
| // The problem | |
| // @syntax | |
| // ask(URL:String, OPTIONS:Object); | |
| const asked = ask('https://myapi.com/v2/rest/issues', { | |
| interval: 1000, | |
| failFactor: function (interval, errorCount) { | |
| return interval * errorCount; | |
| }, | |
| onError: function () {}, | |
| onSuccess: function () {}, | |
| onAll: function () {}, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment