-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make Request object thenable (#515)
* ref: rename io to _fetch in httpRequest module * ref: rename handleError to _retry in httpRequest module * ref: rename shouldRetry to _shouldRetry in httpRequest module * ref: inline delayPromise in handleError in httpRequest module * ref: convert httpRequest into FetchrHttpRequest class * ref: remove duplicated code in Request.end method * docs: fix FetchrClient constructor typo * feat: make Request a thenable object In this way we don't need to call .end() to trigger the request when using promises. * docs: update readme with new then and catch methods
- Loading branch information
1 parent
892783d
commit 7d5118f
Showing
5 changed files
with
236 additions
and
211 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.