title: Can you add headers to getJSON in jQuery?
body: <p>ive been looking to get JSON data for pinterest but notice they currently dont let you get for a user and a specific board so found mashape and i need to get the API key but using header request can this be done using getJSON? current code is:</p>
  
  <p>I need to pass: "X-Mashape-Key: KEY_HERE" i see it can be done in ajax but dont know how to rewrite the getJSON as the loop to that but can see here:</p>
  
  <p><a href="http://blog.mashape.com/mashape-sample-code-executing-ajax-request-using-jquery/" rel="noreferrer">http://blog.mashape.com/mashape-sample-code-executing-ajax-request-using-jquery/</a></p>
  
  <pre><code>$.getJSON(settings.apiPath + settings.username + '/boards/', function (data) {
              beforeSend: setHeader,
              console.log(data);
  
              for (var i = 0; i &lt; settings.count; i++) {
                  var feed = false;
                  if(data.data[i]) {
                      feed = data.data[i];
                  }
  
                  var temp_data = {
                      message: truncate(feed["message"], 100),
                      url: feed["link"]
                  };
  
                  $('#pinterestFeed ul').append('&lt;li class="feed"&gt;' + templating(temp_data) + '&lt;/li&gt;');
              }
              $(".pinterest #loading").hide();  
          });
  </code></pre>