Use pending GET request
See original GitHub issueAn idea for an enhancement to throttle or cache adapters as a flag usePendingRequest
.
If there is a pending [similar] request, then the call returns a promise which will resolve the same as the current request.
An example of this need can be in a framework like React or Angular where a UserName component is mounted in 2 separate DOM locations and they both make the request to fetch user data. If they both mount within milliseconds, neither will see a cached request and start a new request. This feature would reduce simultaneous “like” requests in this situation by returning a promise for the first request made.
I’m happy to contribute this effort, please advise 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
What does "pending" mean for request in Chrome Developer ...
The Network pending state on time, means your request is in progressing state. As soon as it responds the time ...
Read more >chrome requests get stuck pending - nginx - Server Fault
Open the network debugger in Chrome and try to reproduce a stuck request. It will show you an exact timeline: when the request...
Read more >Get pending PAM requests | Microsoft Learn
Using the PAM REST API GET command to list pending requests.
Read more >Angular HTTP Pending Request Pattern - Cory Rylan
Learn how to display HTTP request status messages to users using RxJS Observables. ... This pattern I call the pending request pattern.
Read more >How to Cancel Pending API Requests to Show Correct Data
Turns out there is a way to abort pending DOM asynchronous requests using an AbortController . You can use it to cancel not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
check the
cacheAdapterEnhancer
part😀 https://github.com/kuitos/axios-extensions#basic-usageThat was taken from the example on the README.md of this repository.