-
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.
fix: return the same value when resolving request multiple times
Before this commit, when calling fetchr on the client using the promise API and resolving it multiple times would lead to undefined values. We now make sure to always return the fetch promise in httpRequest. But doing so, broke the abort behavior since we would not return an FetchrHttpRequest to the user from fetchr methods. To fix that, we now save an instance of FetchrHttpRequest in the Request class and added an abort method to the later one to call FetchrHttpRequest.abort method.
- Loading branch information
1 parent
fec3e1b
commit 34b6d4b
Showing
2 changed files
with
44 additions
and
38 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