When using freshworks request api, is there any way to abort the previous request when making request to the same api again.
Like beforeSend in ajax call
Scenario:
Autocomplete with api call, while user is typing in the field. Intention is to cancel the previous request if any exist before making new request.
Unfortunately, the request API cannot be aborted once it’s triggered, I suppose you wanted to abort if it exists so that you don’t exhaust the rate limit.
Based on my understanding of your problem, you can use the data storage or browser’s local storage as a cache like layer to save all the requests(or references or keywords associated with them) and check the cache before making the request.
Also, If you could give us detailed info about the use case and the API that you are trying to integrate with, we could together analyze the problem and come up with alternative solutions.