title: How to change the url parameter of every ajax function in the app on the go?
body: <p>The question is simple. I have a lot of ajax functions all across my application.</p>
  
  <p>Some examples are -</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "http://www.dev.com/login/",
      data: data,
  success: function(result)
          {   
              //success       
          },
  
              dataType: "json",
      });
  
  $.ajax({
          type: "POST",
          url: "http://www.dev.com/register/",
          data: data,
      success: function(result)
              {   
                  //success       
              },
  
                  dataType: "json",
          });
  </code></pre>
  
  <p>Now if I want to change my url from "<code>www.dev.com/login/</code>" to "<code>www.dev.com/login/?apikey=#########</code>", similarly for register, I will have to change the urls everywhere.</p>
  
  <p>Instead I would like to be able to change the url of every ajax function on the go. </p>
  
  <p>Like, have a script which detects when an ajax function is called and appends '<code>?apikey=######</code>' to the url parameter.</p>
  
  <p>Thank you.</p>