title: Difference between ajax and getJSON calls?
body: <p>I have a page being served from a Web.API app located at <code>http://server/application</code>.  On the client side, I am doing a GET to pull some data from the servers.  The problem is what I thought should work does not. </p>
  
  <p>This code works:</p>
  
  <pre><code>$.ajax( {
      url: "api/slideid/getdirectories/",
      dataType: 'json',
      success: function ( data ) {
          setPaths( data );
      }
  } );
  </code></pre>
  
  <p>But this does not:</p>
  
  <pre><code>$.getJSON( "api/slideid/getdirectories/",
      function ( data ) {
          setPaths( data );
      } );
  </code></pre>
  
  <p>In the first example I see in fiddler that the url it is trying to retrieve the data from is <code>http://server/application/api/slideid/getdirectories</code>, which is correct.</p>
  
  <p>In the second, it is <code>http://server/api/slideid/getdirectories</code>, which is not right.   I was thinking that these two methods of json GET were the same.... but it seems they are not?</p>
  
  <p>Interestingly, BOTH these methods work on my local dev box- it is only on my staging server that one works and the other does not.  IIS settings are identical as far as I can tell- and I dug in pretty good to check.</p>
  
  <p>So I'm wondering why getJSON does not work, when the jQuery <a href="http://api.jquery.com/jQuery.getJSON/" rel="nofollow">docs</a> state that getJSON is just shorthand for the .ajax call?
   <p>EDIT:  I had put in an explicit version of getJSON hoping to show that they were very similar calls, but the 'real' getJSON call is now there.</p>