{"action":"created","comment":{"url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/comments/117418663","pull_request_review_id":39125771,"id":117418663,"diff_hunk":"@@ -62,6 +62,7 @@ This constructor is used to transform an [API request](http://kuzzle.io/api-refe\n | `connectionId` | `string` | Passed to [RequestContext](#modelsrequestcontext) constructor |\n | `error` | `KuzzleError` or `Error` | Invokes [setError](#seterrorerror) at initialization |\n | `protocol` | `string` | Passed to [RequestContext](#modelsrequestcontext) constructor |\n+| `headers` | `object` | Passed to [RequestContext](#modelsrequestcontext) constructor |","path":"README.md","position":4,"original_position":4,"commit_id":"cf6cf71d1b536da730e81bef5f09d7831128e01b","original_commit_id":"cf6cf71d1b536da730e81bef5f09d7831128e01b","user":{"login":"scottinet","id":12997967,"avatar_url":"https://avatars3.githubusercontent.com/u/12997967?v=3","gravatar_id":"","url":"https://api.github.com/users/scottinet","html_url":"https://github.com/scottinet","followers_url":"https://api.github.com/users/scottinet/followers","following_url":"https://api.github.com/users/scottinet/following{/other_user}","gists_url":"https://api.github.com/users/scottinet/gists{/gist_id}","starred_url":"https://api.github.com/users/scottinet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottinet/subscriptions","organizations_url":"https://api.github.com/users/scottinet/orgs","repos_url":"https://api.github.com/users/scottinet/repos","events_url":"https://api.github.com/users/scottinet/events{/privacy}","received_events_url":"https://api.github.com/users/scottinet/received_events","type":"User","site_admin":false},"body":"Fifth option: change nothing to the current code, and simply add this line _after_ the `Request` object has been created:\r\n\r\n`request.input.setHeaders(<headers>);`\r\n","created_at":"2017-05-19T07:25:48Z","updated_at":"2017-05-19T07:25:48Z","html_url":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56#discussion_r117418663","pull_request_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/comments/117418663"},"html":{"href":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56#discussion_r117418663"},"pull_request":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56","id":121088834,"html_url":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56","diff_url":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56.diff","patch_url":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56.patch","issue_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/56","number":56,"state":"open","locked":false,"title":"Add request headers to request.input","user":{"login":"ballinette","id":1447135,"avatar_url":"https://avatars1.githubusercontent.com/u/1447135?v=3","gravatar_id":"","url":"https://api.github.com/users/ballinette","html_url":"https://github.com/ballinette","followers_url":"https://api.github.com/users/ballinette/followers","following_url":"https://api.github.com/users/ballinette/following{/other_user}","gists_url":"https://api.github.com/users/ballinette/gists{/gist_id}","starred_url":"https://api.github.com/users/ballinette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballinette/subscriptions","organizations_url":"https://api.github.com/users/ballinette/orgs","repos_url":"https://api.github.com/users/ballinette/repos","events_url":"https://api.github.com/users/ballinette/events{/privacy}","received_events_url":"https://api.github.com/users/ballinette/received_events","type":"User","site_admin":false},"body":"This enable Kuzzle to manage request's HTTP headers (for both HTTP protocol as well as over-HTTP ones, like Websocket and SocketIO), and, for example, setup permissions restrictions according to some headers values.\r\n\r\nfix #55 ","created_at":"2017-05-17T15:36:47Z","updated_at":"2017-05-19T07:25:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4c3458def5651958442fd7d9203abcb75239a28","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56/commits","review_comments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56/comments","review_comment_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/56/comments","statuses_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/statuses/cf6cf71d1b536da730e81bef5f09d7831128e01b","head":{"label":"kuzzleio:fix-55-request-context-headers","ref":"fix-55-request-context-headers","sha":"cf6cf71d1b536da730e81bef5f09d7831128e01b","user":{"login":"kuzzleio","id":12933347,"avatar_url":"https://avatars2.githubusercontent.com/u/12933347?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzzleio","html_url":"https://github.com/kuzzleio","followers_url":"https://api.github.com/users/kuzzleio/followers","following_url":"https://api.github.com/users/kuzzleio/following{/other_user}","gists_url":"https://api.github.com/users/kuzzleio/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzzleio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzzleio/subscriptions","organizations_url":"https://api.github.com/users/kuzzleio/orgs","repos_url":"https://api.github.com/users/kuzzleio/repos","events_url":"https://api.github.com/users/kuzzleio/events{/privacy}","received_events_url":"https://api.github.com/users/kuzzleio/received_events","type":"Organization","site_admin":false},"repo":{"id":59584906,"name":"kuzzle-common-objects","full_name":"kuzzleio/kuzzle-common-objects","owner":{"login":"kuzzleio","id":12933347,"avatar_url":"https://avatars2.githubusercontent.com/u/12933347?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzzleio","html_url":"https://github.com/kuzzleio","followers_url":"https://api.github.com/users/kuzzleio/followers","following_url":"https://api.github.com/users/kuzzleio/following{/other_user}","gists_url":"https://api.github.com/users/kuzzleio/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzzleio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzzleio/subscriptions","organizations_url":"https://api.github.com/users/kuzzleio/orgs","repos_url":"https://api.github.com/users/kuzzleio/repos","events_url":"https://api.github.com/users/kuzzleio/events{/privacy}","received_events_url":"https://api.github.com/users/kuzzleio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kuzzleio/kuzzle-common-objects","description":"Shared object between Kuzzle projects","fork":false,"url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects","forks_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/forks","keys_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/teams","hooks_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/hooks","issue_events_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/events{/number}","events_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/events","assignees_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/assignees{/user}","branches_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/branches{/branch}","tags_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/tags","blobs_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/statuses/{sha}","languages_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/languages","stargazers_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/stargazers","contributors_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/contributors","subscribers_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/subscribers","subscription_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/subscription","commits_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/comments{/number}","contents_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/contents/{+path}","compare_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/merges","archive_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/downloads","issues_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues{/number}","pulls_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls{/number}","milestones_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/milestones{/number}","notifications_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/labels{/name}","releases_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/releases{/id}","deployments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/deployments","created_at":"2016-05-24T15:24:40Z","updated_at":"2017-03-23T08:49:02Z","pushed_at":"2017-05-18T10:06:38Z","git_url":"git://github.com/kuzzleio/kuzzle-common-objects.git","ssh_url":"git@github.com:kuzzleio/kuzzle-common-objects.git","clone_url":"https://github.com/kuzzleio/kuzzle-common-objects.git","svn_url":"https://github.com/kuzzleio/kuzzle-common-objects","homepage":"","size":115,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"kuzzleio:3.x","ref":"3.x","sha":"fc97fba965d5a572ec5dd66758a8135897165f8a","user":{"login":"kuzzleio","id":12933347,"avatar_url":"https://avatars2.githubusercontent.com/u/12933347?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzzleio","html_url":"https://github.com/kuzzleio","followers_url":"https://api.github.com/users/kuzzleio/followers","following_url":"https://api.github.com/users/kuzzleio/following{/other_user}","gists_url":"https://api.github.com/users/kuzzleio/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzzleio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzzleio/subscriptions","organizations_url":"https://api.github.com/users/kuzzleio/orgs","repos_url":"https://api.github.com/users/kuzzleio/repos","events_url":"https://api.github.com/users/kuzzleio/events{/privacy}","received_events_url":"https://api.github.com/users/kuzzleio/received_events","type":"Organization","site_admin":false},"repo":{"id":59584906,"name":"kuzzle-common-objects","full_name":"kuzzleio/kuzzle-common-objects","owner":{"login":"kuzzleio","id":12933347,"avatar_url":"https://avatars2.githubusercontent.com/u/12933347?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzzleio","html_url":"https://github.com/kuzzleio","followers_url":"https://api.github.com/users/kuzzleio/followers","following_url":"https://api.github.com/users/kuzzleio/following{/other_user}","gists_url":"https://api.github.com/users/kuzzleio/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzzleio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzzleio/subscriptions","organizations_url":"https://api.github.com/users/kuzzleio/orgs","repos_url":"https://api.github.com/users/kuzzleio/repos","events_url":"https://api.github.com/users/kuzzleio/events{/privacy}","received_events_url":"https://api.github.com/users/kuzzleio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kuzzleio/kuzzle-common-objects","description":"Shared object between Kuzzle projects","fork":false,"url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects","forks_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/forks","keys_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/teams","hooks_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/hooks","issue_events_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/events{/number}","events_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/events","assignees_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/assignees{/user}","branches_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/branches{/branch}","tags_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/tags","blobs_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/statuses/{sha}","languages_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/languages","stargazers_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/stargazers","contributors_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/contributors","subscribers_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/subscribers","subscription_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/subscription","commits_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/comments{/number}","contents_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/contents/{+path}","compare_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/merges","archive_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/downloads","issues_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues{/number}","pulls_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls{/number}","milestones_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/milestones{/number}","notifications_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/labels{/name}","releases_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/releases{/id}","deployments_url":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/deployments","created_at":"2016-05-24T15:24:40Z","updated_at":"2017-03-23T08:49:02Z","pushed_at":"2017-05-18T10:06:38Z","git_url":"git://github.com/kuzzleio/kuzzle-common-objects.git","ssh_url":"git@github.com:kuzzleio/kuzzle-common-objects.git","clone_url":"https://github.com/kuzzleio/kuzzle-common-objects.git","svn_url":"https://github.com/kuzzleio/kuzzle-common-objects","homepage":"","size":115,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56"},"html":{"href":"https://github.com/kuzzleio/kuzzle-common-objects/pull/56"},"issue":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/56"},"comments":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/kuzzleio/kuzzle-common-objects/statuses/cf6cf71d1b536da730e81bef5f09d7831128e01b"}}}}
{"actor":{"display_login":"scottinet"}}