{"action":"created","comment":{"url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/comments/72208660","id":72208660,"diff_hunk":"@@ -21,6 +21,16 @@ var port = 1026;\n \n module.exports = performRequest;\n \n+/**\n+ * Helper function to perform requests against Orion\n+ *\n+ * @param {Object} endpoint - Endpoint to perform the request\n+ * @param {Object} method - HTTP method to use\n+ * @param {Object} data - Data to send\n+ * @param {Object} fiwareHeaders - Headers to use\n+ * @param {Object} querystring - querystring data\n+ * @return {Promise} promise with the result of the request\n+*/\n function performRequest(endpoint, method, data, fiwareHeaders, querystring) {\n \n   var deferred = Q.defer();","path":"server/auth/authrequest.js","position":16,"original_position":16,"commit_id":"74c6deed4b174bd84ea9af02ef4e06f0752f35e6","original_commit_id":"74c6deed4b174bd84ea9af02ef4e06f0752f35e6","user":{"login":"FiwareULPGC","id":9944828,"avatar_url":"https://avatars.githubusercontent.com/u/9944828?v=3","gravatar_id":"","url":"https://api.github.com/users/FiwareULPGC","html_url":"https://github.com/FiwareULPGC","followers_url":"https://api.github.com/users/FiwareULPGC/followers","following_url":"https://api.github.com/users/FiwareULPGC/following{/other_user}","gists_url":"https://api.github.com/users/FiwareULPGC/gists{/gist_id}","starred_url":"https://api.github.com/users/FiwareULPGC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiwareULPGC/subscriptions","organizations_url":"https://api.github.com/users/FiwareULPGC/orgs","repos_url":"https://api.github.com/users/FiwareULPGC/repos","events_url":"https://api.github.com/users/FiwareULPGC/events{/privacy}","received_events_url":"https://api.github.com/users/FiwareULPGC/received_events","type":"User","site_admin":false},"body":"(Lines 39-43) Maybe is better to use:\r\n```\r\nif (fiwareHeaders) {\r\n  if (fiwareHeaders['fiware-service']) {\r\n    .....\r\n  }\r\n  if (fiwareHeaders['fiware-servicepath']) {\r\n    .....\r\n  }\r\n}\r\n\r\n```","created_at":"2016-07-26T08:35:35Z","updated_at":"2016-07-26T08:35:35Z","html_url":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116#discussion_r72208660","pull_request_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116","_links":{"self":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/comments/72208660"},"html":{"href":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116#discussion_r72208660"},"pull_request":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116"}}},"pull_request":{"url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116","id":74114955,"html_url":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116","diff_url":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116.diff","patch_url":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116.patch","issue_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/116","number":116,"state":"open","locked":false,"title":"Doc/comment server code","user":{"login":"albertinisg","id":8257425,"avatar_url":"https://avatars.githubusercontent.com/u/8257425?v=3","gravatar_id":"","url":"https://api.github.com/users/albertinisg","html_url":"https://github.com/albertinisg","followers_url":"https://api.github.com/users/albertinisg/followers","following_url":"https://api.github.com/users/albertinisg/following{/other_user}","gists_url":"https://api.github.com/users/albertinisg/gists{/gist_id}","starred_url":"https://api.github.com/users/albertinisg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertinisg/subscriptions","organizations_url":"https://api.github.com/users/albertinisg/orgs","repos_url":"https://api.github.com/users/albertinisg/repos","events_url":"https://api.github.com/users/albertinisg/events{/privacy}","received_events_url":"https://api.github.com/users/albertinisg/received_events","type":"User","site_admin":false},"body":"This PR fixes #85 ","created_at":"2016-06-16T16:51:23Z","updated_at":"2016-07-26T08:35:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a25259af4e3fc92688cb9ecbbac10ca02ea0d861","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/milestones/4","html_url":"https://github.com/Fiware/tutorials.TourGuide-App/milestones/Sprint%205.3.3","labels_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/milestones/4/labels","id":1810382,"number":4,"title":"Sprint 5.3.3","description":"","creator":{"login":"albertinisg","id":8257425,"avatar_url":"https://avatars.githubusercontent.com/u/8257425?v=3","gravatar_id":"","url":"https://api.github.com/users/albertinisg","html_url":"https://github.com/albertinisg","followers_url":"https://api.github.com/users/albertinisg/followers","following_url":"https://api.github.com/users/albertinisg/following{/other_user}","gists_url":"https://api.github.com/users/albertinisg/gists{/gist_id}","starred_url":"https://api.github.com/users/albertinisg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertinisg/subscriptions","organizations_url":"https://api.github.com/users/albertinisg/orgs","repos_url":"https://api.github.com/users/albertinisg/repos","events_url":"https://api.github.com/users/albertinisg/events{/privacy}","received_events_url":"https://api.github.com/users/albertinisg/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2016-06-06T09:57:50Z","updated_at":"2016-06-16T16:51:23Z","due_on":"2016-06-29T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116/commits","review_comments_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116/comments","review_comment_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/116/comments","statuses_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/statuses/74c6deed4b174bd84ea9af02ef4e06f0752f35e6","head":{"label":"albertinisg:doc/comment-server-code","ref":"doc/comment-server-code","sha":"74c6deed4b174bd84ea9af02ef4e06f0752f35e6","user":{"login":"albertinisg","id":8257425,"avatar_url":"https://avatars.githubusercontent.com/u/8257425?v=3","gravatar_id":"","url":"https://api.github.com/users/albertinisg","html_url":"https://github.com/albertinisg","followers_url":"https://api.github.com/users/albertinisg/followers","following_url":"https://api.github.com/users/albertinisg/following{/other_user}","gists_url":"https://api.github.com/users/albertinisg/gists{/gist_id}","starred_url":"https://api.github.com/users/albertinisg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertinisg/subscriptions","organizations_url":"https://api.github.com/users/albertinisg/orgs","repos_url":"https://api.github.com/users/albertinisg/repos","events_url":"https://api.github.com/users/albertinisg/events{/privacy}","received_events_url":"https://api.github.com/users/albertinisg/received_events","type":"User","site_admin":false},"repo":{"id":52603115,"name":"tutorials.TourGuide-App","full_name":"albertinisg/tutorials.TourGuide-App","owner":{"login":"albertinisg","id":8257425,"avatar_url":"https://avatars.githubusercontent.com/u/8257425?v=3","gravatar_id":"","url":"https://api.github.com/users/albertinisg","html_url":"https://github.com/albertinisg","followers_url":"https://api.github.com/users/albertinisg/followers","following_url":"https://api.github.com/users/albertinisg/following{/other_user}","gists_url":"https://api.github.com/users/albertinisg/gists{/gist_id}","starred_url":"https://api.github.com/users/albertinisg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertinisg/subscriptions","organizations_url":"https://api.github.com/users/albertinisg/orgs","repos_url":"https://api.github.com/users/albertinisg/repos","events_url":"https://api.github.com/users/albertinisg/events{/privacy}","received_events_url":"https://api.github.com/users/albertinisg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/albertinisg/tutorials.TourGuide-App","description":"FIWARE Tour Guide Application. See http://bit.ly/1pby3WP","fork":true,"url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App","forks_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/forks","keys_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/teams","hooks_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/hooks","issue_events_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/issues/events{/number}","events_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/events","assignees_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/assignees{/user}","branches_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/branches{/branch}","tags_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/tags","blobs_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/statuses/{sha}","languages_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/languages","stargazers_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/stargazers","contributors_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/contributors","subscribers_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/subscribers","subscription_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/subscription","commits_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/contents/{+path}","compare_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/merges","archive_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/downloads","issues_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/issues{/number}","pulls_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/pulls{/number}","milestones_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/milestones{/number}","notifications_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/labels{/name}","releases_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/releases{/id}","deployments_url":"https://api.github.com/repos/albertinisg/tutorials.TourGuide-App/deployments","created_at":"2016-02-26T12:31:11Z","updated_at":"2016-02-26T12:31:12Z","pushed_at":"2016-06-16T18:23:31Z","git_url":"git://github.com/albertinisg/tutorials.TourGuide-App.git","ssh_url":"git@github.com:albertinisg/tutorials.TourGuide-App.git","clone_url":"https://github.com/albertinisg/tutorials.TourGuide-App.git","svn_url":"https://github.com/albertinisg/tutorials.TourGuide-App","homepage":"","size":9906,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Fiware:develop","ref":"develop","sha":"a5eeb368746031c0d9a58839a3cf3e464e832f88","user":{"login":"Fiware","id":5936803,"avatar_url":"https://avatars.githubusercontent.com/u/5936803?v=3","gravatar_id":"","url":"https://api.github.com/users/Fiware","html_url":"https://github.com/Fiware","followers_url":"https://api.github.com/users/Fiware/followers","following_url":"https://api.github.com/users/Fiware/following{/other_user}","gists_url":"https://api.github.com/users/Fiware/gists{/gist_id}","starred_url":"https://api.github.com/users/Fiware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fiware/subscriptions","organizations_url":"https://api.github.com/users/Fiware/orgs","repos_url":"https://api.github.com/users/Fiware/repos","events_url":"https://api.github.com/users/Fiware/events{/privacy}","received_events_url":"https://api.github.com/users/Fiware/received_events","type":"Organization","site_admin":false},"repo":{"id":38439707,"name":"tutorials.TourGuide-App","full_name":"Fiware/tutorials.TourGuide-App","owner":{"login":"Fiware","id":5936803,"avatar_url":"https://avatars.githubusercontent.com/u/5936803?v=3","gravatar_id":"","url":"https://api.github.com/users/Fiware","html_url":"https://github.com/Fiware","followers_url":"https://api.github.com/users/Fiware/followers","following_url":"https://api.github.com/users/Fiware/following{/other_user}","gists_url":"https://api.github.com/users/Fiware/gists{/gist_id}","starred_url":"https://api.github.com/users/Fiware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fiware/subscriptions","organizations_url":"https://api.github.com/users/Fiware/orgs","repos_url":"https://api.github.com/users/Fiware/repos","events_url":"https://api.github.com/users/Fiware/events{/privacy}","received_events_url":"https://api.github.com/users/Fiware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Fiware/tutorials.TourGuide-App","description":"FIWARE Tour Guide Application. See http://bit.ly/1pby3WP","fork":false,"url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App","forks_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/forks","keys_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/teams","hooks_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/hooks","issue_events_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/events{/number}","events_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/events","assignees_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/assignees{/user}","branches_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/branches{/branch}","tags_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/tags","blobs_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/statuses/{sha}","languages_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/languages","stargazers_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/stargazers","contributors_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/contributors","subscribers_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/subscribers","subscription_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/subscription","commits_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/contents/{+path}","compare_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/merges","archive_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/downloads","issues_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues{/number}","pulls_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls{/number}","milestones_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/milestones{/number}","notifications_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/labels{/name}","releases_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/releases{/id}","deployments_url":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/deployments","created_at":"2015-07-02T15:08:43Z","updated_at":"2016-07-20T14:55:58Z","pushed_at":"2016-07-15T11:34:43Z","git_url":"git://github.com/Fiware/tutorials.TourGuide-App.git","ssh_url":"git@github.com:Fiware/tutorials.TourGuide-App.git","clone_url":"https://github.com/Fiware/tutorials.TourGuide-App.git","svn_url":"https://github.com/Fiware/tutorials.TourGuide-App","homepage":"","size":10171,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":21,"forks":12,"open_issues":21,"watchers":10,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116"},"html":{"href":"https://github.com/Fiware/tutorials.TourGuide-App/pull/116"},"issue":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/116"},"comments":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/Fiware/tutorials.TourGuide-App/statuses/74c6deed4b174bd84ea9af02ef4e06f0752f35e6"}}}}
{"actor":{"display_login":"FiwareULPGC"}}