{"action":"created","comment":{"url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/comments/58754907","id":58754907,"diff_hunk":"@@ -57,6 +59,25 @@ export class BaseApi {\n             return Promise.reject(new Error('Must not use an app token for authentication.'));\n         }\n \n-        return Promise.resolve(this.authHeaders);\n+        return Promise.resolve();\n+    }\n+\n+\n+    request(method, url, data, {allowedAuth=this.allowedAuth} = {}) {","path":"src/api/base.js","position":27,"original_position":27,"commit_id":"bf19c92762ff79426cfa2acfeca43a6ab08a9f0d","original_commit_id":"bf19c92762ff79426cfa2acfeca43a6ab08a9f0d","user":{"login":"lemieux","id":781844,"avatar_url":"https://avatars.githubusercontent.com/u/781844?v=3","gravatar_id":"","url":"https://api.github.com/users/lemieux","html_url":"https://github.com/lemieux","followers_url":"https://api.github.com/users/lemieux/followers","following_url":"https://api.github.com/users/lemieux/following{/other_user}","gists_url":"https://api.github.com/users/lemieux/gists{/gist_id}","starred_url":"https://api.github.com/users/lemieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemieux/subscriptions","organizations_url":"https://api.github.com/users/lemieux/orgs","repos_url":"https://api.github.com/users/lemieux/repos","events_url":"https://api.github.com/users/lemieux/events{/privacy}","received_events_url":"https://api.github.com/users/lemieux/received_events","type":"User","site_admin":false},"body":"nice","created_at":"2016-04-06T18:16:27Z","updated_at":"2016-04-06T18:16:27Z","html_url":"https://github.com/smooch/smooch-core-js/pull/31#discussion_r58754907","pull_request_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/comments/58754907"},"html":{"href":"https://github.com/smooch/smooch-core-js/pull/31#discussion_r58754907"},"pull_request":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31","id":65511187,"html_url":"https://github.com/smooch/smooch-core-js/pull/31","diff_url":"https://github.com/smooch/smooch-core-js/pull/31.diff","patch_url":"https://github.com/smooch/smooch-core-js/pull/31.patch","issue_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/31","number":31,"state":"open","locked":false,"title":"Add ability to specify custom headers in constructor","user":{"login":"Mario54","id":1486407,"avatar_url":"https://avatars.githubusercontent.com/u/1486407?v=3","gravatar_id":"","url":"https://api.github.com/users/Mario54","html_url":"https://github.com/Mario54","followers_url":"https://api.github.com/users/Mario54/followers","following_url":"https://api.github.com/users/Mario54/following{/other_user}","gists_url":"https://api.github.com/users/Mario54/gists{/gist_id}","starred_url":"https://api.github.com/users/Mario54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mario54/subscriptions","organizations_url":"https://api.github.com/users/Mario54/orgs","repos_url":"https://api.github.com/users/Mario54/repos","events_url":"https://api.github.com/users/Mario54/events{/privacy}","received_events_url":"https://api.github.com/users/Mario54/received_events","type":"User","site_admin":false},"body":"@lemieux @dannytranlx @mspensieri \r\n\r\nWe can now pass in custom HTTP headers in the constructor by doing\r\n```js\r\nnew Smooch(..., {\r\n    headers: {\r\n        myCustomHeader: '...'\r\n    }\r\n});\r\n```\r\n\r\nTo pass in the service url, it becomes:\r\n```js\r\nnew Smooch(..., {\r\n    serviceUrl: '...'\r\n    headers: {\r\n        myCustomHeader: '...'\r\n    }\r\n});\r\n```","created_at":"2016-04-06T18:12:55Z","updated_at":"2016-04-06T18:16:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f146d6cbe5fd9be21d489fc2e4bbb47662f60be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31/commits","review_comments_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31/comments","review_comment_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/31/comments","statuses_url":"https://api.github.com/repos/smooch/smooch-core-js/statuses/bf19c92762ff79426cfa2acfeca43a6ab08a9f0d","head":{"label":"smooch:f/custom-headers","ref":"f/custom-headers","sha":"bf19c92762ff79426cfa2acfeca43a6ab08a9f0d","user":{"login":"smooch","id":14301989,"avatar_url":"https://avatars.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"repo":{"id":45292528,"name":"smooch-core-js","full_name":"smooch/smooch-core-js","owner":{"login":"smooch","id":14301989,"avatar_url":"https://avatars.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smooch/smooch-core-js","description":"Javascript API for Smooch","fork":false,"url":"https://api.github.com/repos/smooch/smooch-core-js","forks_url":"https://api.github.com/repos/smooch/smooch-core-js/forks","keys_url":"https://api.github.com/repos/smooch/smooch-core-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smooch/smooch-core-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smooch/smooch-core-js/teams","hooks_url":"https://api.github.com/repos/smooch/smooch-core-js/hooks","issue_events_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/events{/number}","events_url":"https://api.github.com/repos/smooch/smooch-core-js/events","assignees_url":"https://api.github.com/repos/smooch/smooch-core-js/assignees{/user}","branches_url":"https://api.github.com/repos/smooch/smooch-core-js/branches{/branch}","tags_url":"https://api.github.com/repos/smooch/smooch-core-js/tags","blobs_url":"https://api.github.com/repos/smooch/smooch-core-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smooch/smooch-core-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smooch/smooch-core-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/smooch/smooch-core-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smooch/smooch-core-js/statuses/{sha}","languages_url":"https://api.github.com/repos/smooch/smooch-core-js/languages","stargazers_url":"https://api.github.com/repos/smooch/smooch-core-js/stargazers","contributors_url":"https://api.github.com/repos/smooch/smooch-core-js/contributors","subscribers_url":"https://api.github.com/repos/smooch/smooch-core-js/subscribers","subscription_url":"https://api.github.com/repos/smooch/smooch-core-js/subscription","commits_url":"https://api.github.com/repos/smooch/smooch-core-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/smooch/smooch-core-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/smooch/smooch-core-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/smooch/smooch-core-js/contents/{+path}","compare_url":"https://api.github.com/repos/smooch/smooch-core-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smooch/smooch-core-js/merges","archive_url":"https://api.github.com/repos/smooch/smooch-core-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smooch/smooch-core-js/downloads","issues_url":"https://api.github.com/repos/smooch/smooch-core-js/issues{/number}","pulls_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls{/number}","milestones_url":"https://api.github.com/repos/smooch/smooch-core-js/milestones{/number}","notifications_url":"https://api.github.com/repos/smooch/smooch-core-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smooch/smooch-core-js/labels{/name}","releases_url":"https://api.github.com/repos/smooch/smooch-core-js/releases{/id}","deployments_url":"https://api.github.com/repos/smooch/smooch-core-js/deployments","created_at":"2015-10-31T07:11:39Z","updated_at":"2016-02-23T20:28:23Z","pushed_at":"2016-04-06T18:12:55Z","git_url":"git://github.com/smooch/smooch-core-js.git","ssh_url":"git@github.com:smooch/smooch-core-js.git","clone_url":"https://github.com/smooch/smooch-core-js.git","svn_url":"https://github.com/smooch/smooch-core-js","homepage":"https://smooch.io","size":96,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"integration"}},"base":{"label":"smooch:integration","ref":"integration","sha":"d75f11f29d8de554ad2a0680217699f167dc4c2d","user":{"login":"smooch","id":14301989,"avatar_url":"https://avatars.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"repo":{"id":45292528,"name":"smooch-core-js","full_name":"smooch/smooch-core-js","owner":{"login":"smooch","id":14301989,"avatar_url":"https://avatars.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smooch/smooch-core-js","description":"Javascript API for Smooch","fork":false,"url":"https://api.github.com/repos/smooch/smooch-core-js","forks_url":"https://api.github.com/repos/smooch/smooch-core-js/forks","keys_url":"https://api.github.com/repos/smooch/smooch-core-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smooch/smooch-core-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smooch/smooch-core-js/teams","hooks_url":"https://api.github.com/repos/smooch/smooch-core-js/hooks","issue_events_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/events{/number}","events_url":"https://api.github.com/repos/smooch/smooch-core-js/events","assignees_url":"https://api.github.com/repos/smooch/smooch-core-js/assignees{/user}","branches_url":"https://api.github.com/repos/smooch/smooch-core-js/branches{/branch}","tags_url":"https://api.github.com/repos/smooch/smooch-core-js/tags","blobs_url":"https://api.github.com/repos/smooch/smooch-core-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smooch/smooch-core-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smooch/smooch-core-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/smooch/smooch-core-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smooch/smooch-core-js/statuses/{sha}","languages_url":"https://api.github.com/repos/smooch/smooch-core-js/languages","stargazers_url":"https://api.github.com/repos/smooch/smooch-core-js/stargazers","contributors_url":"https://api.github.com/repos/smooch/smooch-core-js/contributors","subscribers_url":"https://api.github.com/repos/smooch/smooch-core-js/subscribers","subscription_url":"https://api.github.com/repos/smooch/smooch-core-js/subscription","commits_url":"https://api.github.com/repos/smooch/smooch-core-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/smooch/smooch-core-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/smooch/smooch-core-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/smooch/smooch-core-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/smooch/smooch-core-js/contents/{+path}","compare_url":"https://api.github.com/repos/smooch/smooch-core-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smooch/smooch-core-js/merges","archive_url":"https://api.github.com/repos/smooch/smooch-core-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smooch/smooch-core-js/downloads","issues_url":"https://api.github.com/repos/smooch/smooch-core-js/issues{/number}","pulls_url":"https://api.github.com/repos/smooch/smooch-core-js/pulls{/number}","milestones_url":"https://api.github.com/repos/smooch/smooch-core-js/milestones{/number}","notifications_url":"https://api.github.com/repos/smooch/smooch-core-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smooch/smooch-core-js/labels{/name}","releases_url":"https://api.github.com/repos/smooch/smooch-core-js/releases{/id}","deployments_url":"https://api.github.com/repos/smooch/smooch-core-js/deployments","created_at":"2015-10-31T07:11:39Z","updated_at":"2016-02-23T20:28:23Z","pushed_at":"2016-04-06T18:12:55Z","git_url":"git://github.com/smooch/smooch-core-js.git","ssh_url":"git@github.com:smooch/smooch-core-js.git","clone_url":"https://github.com/smooch/smooch-core-js.git","svn_url":"https://github.com/smooch/smooch-core-js","homepage":"https://smooch.io","size":96,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31"},"html":{"href":"https://github.com/smooch/smooch-core-js/pull/31"},"issue":{"href":"https://api.github.com/repos/smooch/smooch-core-js/issues/31"},"comments":{"href":"https://api.github.com/repos/smooch/smooch-core-js/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smooch/smooch-core-js/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/smooch/smooch-core-js/statuses/bf19c92762ff79426cfa2acfeca43a6ab08a9f0d"}}}}