By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,237 Members | 1,483 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,237 IT Pros & Developers. It's quick & easy.

Cancel a REST request

P: 42
Long story short: Can you cancel a POST or GET REST request once it's sent?

Situation: This is not a site that I'm developing, but if possible, I want to recommend that the developers cancel a POST request that populates search results in real-time as the user types characters into the search box.

Scenario: The user types a few characters, stops for a second, then types more characters.

Issue: The app sends a POST request once the user stops typing for 400ms. When the user starts typing again, it sends another request.

Repercussion: First and foremost, this takes extra resources from the system, unnecessarily. Aside from that, the real-time search results will be populated by whichever request takes longer to process. Typically, the first request will return results faster than the second request, and be trumped by the second request, but that's not always the case.
May 24 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.