title: How to handle multiple requests being sent in JavaScript?
body: <p>Working on a platform, to enable auto-ticketing functionality. For which a REST API request is used for ticket creation. Unfortunately, there are 2 requests popping simultaneously, which results in creating duplicated tickets.</p>
  
  <p>How to handle such case and send only one of these requests?</p>
  
  <p>Tried adding the 2nd request in the response callback of the first, though this does not seem to work.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>if (flag == 1){
   logger.debug("Node-down alarm-Request raised - +sitn_id);
   clearTimeout(mouseoverTimer);
   mouseoverTimer  = setTimeout(function(){  
   logger.debug("Inside Call back function - ");
          //function call for ticket creation
   incidentRequest(sitn_id,confUtil.config.mule_url);
  }, 10);
              
             </code></pre>
  </div>
  </div>
  </p>