title: jQuery and Google URL Shortener API
body: <p>I'm trying to shorten a URL using the <code>http://goo.gl</code> API with the following jQuery function</p>
  
  <pre><code>$.ajax({
          url: 'https://www.googleapis.com/urlshortener/v1/url?key=MY_API_KEY',
          crossDomain: true,
          type: 'POST',
          contentType: 'application/json',
          data: '{longUrl:"'+encodeURI(url)+'"}',
          dataType: 'jsonp',
          success: function(e) {
              alert(JSON.stringify(e));
          }
       });
  </code></pre>
  
  <p>And I get the following Error in JSON :</p>
  
  <pre><code>{"error":{"errors":[{"domain":"global","reason":"required","message":"Required parameter: shortUrl","locationType":"parameter","location":"shortUrl"}],"code":400,"message":"Required parameter: shortUrl"}}
  </code></pre>
  
  <p>Why does it ask for a Short URL? What am I doing wrong?</p>