{"action":"created","issue":{"url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/10","labels_url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/10/comments","events_url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/10/events","html_url":"https://github.com/ga-dc/pbj-project3/issues/10","id":102857574,"number":10,"title":"API request request header issue","user":{"login":"edwardpark","id":7883907,"avatar_url":"https://avatars.githubusercontent.com/u/7883907?v=3","gravatar_id":"","url":"https://api.github.com/users/edwardpark","html_url":"https://github.com/edwardpark","followers_url":"https://api.github.com/users/edwardpark/followers","following_url":"https://api.github.com/users/edwardpark/following{/other_user}","gists_url":"https://api.github.com/users/edwardpark/gists{/gist_id}","starred_url":"https://api.github.com/users/edwardpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwardpark/subscriptions","organizations_url":"https://api.github.com/users/edwardpark/orgs","repos_url":"https://api.github.com/users/edwardpark/repos","events_url":"https://api.github.com/users/edwardpark/events{/privacy}","received_events_url":"https://api.github.com/users/edwardpark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-24T18:14:46Z","updated_at":"2015-08-24T18:25:54Z","closed_at":null,"body":"we are trying to call a external api in our app.js file and are using the nom request module. however we are confused how to include the api key into the header for it to work.\r\n\r\nright now below is the code we are using and have required and install npm request but keep receiving the error  \"statusCode\": 404, \"message\": \"Resource not found\" \r\n\r\nwe have also tried inserting the api_key into the url to no avail. \r\n```\r\nrequest({\r\n  uri: \"https://api.wmata.com/NextBusService.svc/json/jPredictions&1001195\",\r\n  method: \"GET\",\r\n  timeout: 10000,\r\n  xhr.setRequestHeader(api_key, \"fa310ecaa39a489db9e3ba0e4978d115\"),\r\n  followRedirect: true,\r\n  maxRedirects: 10\r\n}, function(error, response, body) {\r\n  console.log(body);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/comments/134327300","html_url":"https://github.com/ga-dc/pbj-project3/issues/10#issuecomment-134327300","issue_url":"https://api.github.com/repos/ga-dc/pbj-project3/issues/10","id":134327300,"user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T18:25:54Z","updated_at":"2015-08-24T18:25:54Z","body":"Try `console.log([error, response, body]);` There has to be information in one of those three."}}