Problem with canceling the request
See original GitHub issueSpecs: “react-native”: “0.55.4”, “rn-fetch-blob”: “0.10.12”,
Hello guys 😃
So I have a problem with canceling request. I’m trying to download some huge apk file (more than 400 MB) and I want to give user ability to cancel the download process.
So I’m creating the request in this way:
let request = RNFetchBlob.config({
path: apkPath,
fileCache: true
}).fetch('GET', app.apkDownloadUrl)
.then((res) => {[...]});
Then, when I call:
request.cancel();
There is error that says that “cancel” is not a function. What I’m doing wrong? 😃
BTW: Beside this issue, great library!
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
How to Respond to a Cancellation Requests + Email Templates
Handle cancellation requests better with these 10 sample emails. Templates that you can use to reply to cancellation emails.
Read more >Request Cancellation - YouTube
There's a catch, though: although the client times out and displays an error, it doesn't actually cancel the request, so the application ...
Read more >What is the Correct HTTP Status Code for a Cancelled Request
There's no ability within HTTP for a client to cancel a request. So it's not surprising that no code is defined for the...
Read more >Canceling Requests - Redux Resource
Canceling requests prevents race conditions. A race condition occurs when you have two requests in flight at the same time, but your code...
Read more >Request Cancellation - James Shore
This turns out to be a design problem. Although cancelling requests is easy to do in Node.js—you just call request.destroy() on the Node...
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
I managed to solve it with this workaround
I have an issue maybe is a bug, I don’t know. When I request a cancel the promise of success is triggered.