Questions tagged [request-cancelling]

Stopping or safely ignoring a request, usually an HTTP transaction between a client and a server.

Stopping or safely ignoring a request, usually an HTTP transaction (GET, POST, etc.) between a client and a server.

This is most often applicable in an AJAX context -- especially if synchronous AJAX is used.

Requests can be canceled/ignored by the client and/or the server.

71 questions
1
vote
1 answer

How to test user request cancellation in C# 3.1 net core (HttpClient CancellationToken seems to be always throwing since 3.1)

Recently I wanted to upgrade from dot.net netcoreapp2.2 to netcoreapp3.1. I am using https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.1 to execute tests for my API implementation. There is one test that verifies…
1
vote
0 answers

Cancel the http request on clicking a button in angular 7

in angular 7, when I click on button then it should cancel the http request. I am using unsubscribe method for this , on unsubscribe the call is in pending status and after some time it shows complete status but the response is not coming to…
user12200814
1
vote
4 answers

angularjs checking data before request

I'm sending data to my php script. Data looks like Controller: app.controller('searchCtrl', function($scope,$rootScope,$http,$q){ $scope.search = function( values , type) { if($scope.abort) { $scope.abort.resolve(); } …
kliukovking
  • 569
  • 1
  • 5
  • 16
1
vote
1 answer

Are HTTP requests always cancelled by all browsers if originator iframe is destroyed before it completes?

On Chrome I have noticed that if I destroy an iframe before a request to submit a form inside it completes then the request is cancelled. This does not seem to happen in Firefox and IE. Is this something which the spec recommends ? Do other browsers…
AppleGrew
  • 9,302
  • 24
  • 80
  • 124
1
vote
1 answer

AFNetworking cancel post request

i know, this question ask before. But not working for me this scenario. i am working on AFNetworking for transfer layer. My code below. AFHTTPRequestOperation *post; AFHTTPRequestOperationManager *manager; AFHTTPRequestOperationManager * manager =…
1
vote
1 answer

How to let long tasks be "cancellable" via HTTP on Tornado HTTP servers?

I've implemented an HTTP wrapper of some kind of heavy task, and I chose Tornado as a front-end server framework (it's because the heavy task is written in Python, and I'm just used to Tornado). Currently, I just called heavy tasks directly from…
Izumi Kawashima
  • 1,197
  • 11
  • 25
1
vote
2 answers

Cancel Alamofire file download if this file is already exists

How to cancel Alamofire request if the downloaded file is already exists in documents folder? Here is the code for request: Alamofire.download(.GET, fileUrls[button.tag], destination: { (temporaryURL, response) in if let directoryURL =…
mkz
  • 2,302
  • 2
  • 30
  • 43
1
vote
2 answers

Meteor - Requests randomly failing

I have this weird problem where some requests fails randomly. I have no idea what is causing this behavior. Sometimes it is images not loading and sometimes it is ajax request (cfs/severtime or algolia-search) and some other times everything is…
Frank6
  • 1,193
  • 1
  • 11
  • 23
1
vote
0 answers

Preventing subsequent $http calls in angularjs when one fails

In my project, we are using angularjs and RESTful APIs. Let's say I am trying to load a page, where we may be making calls to 6 rest apis. Say the first one fails- meaning I get a 200 but there is actually an exception that has occurred in the Java…
1
vote
1 answer

How to add cancel ability for download processing in notification in Android?

I have this code for download by download manger, code: DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); request.setDescription(name); request.setTitle("دانلود ویدیو"); if…
1
vote
3 answers

Symfony : ajax call cause server to queue next queries

I've a problem with my application when an ajax call on the server takes too much time : it queue all the others queries from the user until it's done server side (I realized that canceling the call client side has no effect and the user still have…
Remiz
  • 390
  • 3
  • 10
1
vote
0 answers

What is going wrong with kendo upload cancel?

I am seeing a very odd thing happen with kendo UI's kendoUpload. I have implemented a custom UI for displaying the files being uploaded, along with a progress bar and a cancel button. Kendo does not offer an API for cancelling uploads, but I read…
danludwig
  • 46,965
  • 25
  • 159
  • 237
1
vote
2 answers

background worker class cancellation, sets cancellation pending flag but doesn't quit

I call obackgroundworker.CancelAsync(); on a background worker currently doing some work in another thread and then using while (obackgroundworker.IsBusy == true) to wait for it to finish before quitting the application (in case the user…
Nath
  • 203
  • 4
  • 17
1
vote
0 answers

Error when canceling file upload in formiable-node

I'm using Formiable-node for uploading files. I'm getting the following error when attempting to cancel an upload. [Error: Request aborted] events.js:71 throw arguments[1]; // Unhandled 'error' event ^ Error: EBADF,…
MrB
  • 1,544
  • 3
  • 18
  • 30
1
vote
1 answer

Android: How to cancel/interrupt a synchronous Service call?

For the Application object, I call bindService(). The onServiceConnected() callback receives an IBinder object, and I hand that to an AsyncTask. There, I get my service object by calling ServiceClass.Stub.asInterface(iBinderObject) and call some…
class stacker
  • 5,357
  • 2
  • 32
  • 65