title: AngularJS include API key in a get request
body: <p>I am trying to get information from a fantasy data API using AngularJS. I am using $resource to perform my get request in my controller, but I haven't been able to figure out how to correctly include the API key. Do I need to include it as a header? Thanks.</p>
  
  <pre><code>nflApp.controller('mainController', ['$scope','$resource','$routeParams', function($scope, $resource, $routeParams) {
  
  $scope.fantasyAPI = $resource("https://api.fantasydata.net/nfl/v2/JSON/DailyFantasyPlayers/2015-DEC-28", { callback: "JSON_CALLBACK" }, { get: { method: "JSONP"}});
  
  console.log($scope.fantasyAPI);
  
  }]);
  </code></pre>
  
  <p>Below is the http request info from the site. <img src="https://i.stack.imgur.com/4GZ6r.png" alt="http request info"></p>