{"action":"created","comment":{"url":"https://api.github.com/repos/andela/learning-map-front/pulls/comments/133820300","pull_request_review_id":57045827,"id":133820300,"diff_hunk":"@@ -0,0 +1,7 @@\n+const getHeader = () => {\n+  const jwt = document.cookie.split('jwt-token=');\n+  const token = jwt[1];","path":"src/helpers/headers.ts","position":3,"original_position":3,"commit_id":"0bb201fd950bee1f0b925f813010dcc886ed07bb","original_commit_id":"0bb201fd950bee1f0b925f813010dcc886ed07bb","user":{"login":"BolajiOlajide","id":25608335,"avatar_url":"https://avatars0.githubusercontent.com/u/25608335?v=4","gravatar_id":"","url":"https://api.github.com/users/BolajiOlajide","html_url":"https://github.com/BolajiOlajide","followers_url":"https://api.github.com/users/BolajiOlajide/followers","following_url":"https://api.github.com/users/BolajiOlajide/following{/other_user}","gists_url":"https://api.github.com/users/BolajiOlajide/gists{/gist_id}","starred_url":"https://api.github.com/users/BolajiOlajide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BolajiOlajide/subscriptions","organizations_url":"https://api.github.com/users/BolajiOlajide/orgs","repos_url":"https://api.github.com/users/BolajiOlajide/repos","events_url":"https://api.github.com/users/BolajiOlajide/events{/privacy}","received_events_url":"https://api.github.com/users/BolajiOlajide/received_events","type":"User","site_admin":false},"body":"Line 2 and line 3 can be merged into one line: `const jwt = document.cookie.split('jwt-token=')[1]`\r\nJust a thought.","created_at":"2017-08-17T20:29:01Z","updated_at":"2017-08-17T20:29:01Z","html_url":"https://github.com/andela/learning-map-front/pull/30#discussion_r133820300","pull_request_url":"https://api.github.com/repos/andela/learning-map-front/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/comments/133820300"},"html":{"href":"https://github.com/andela/learning-map-front/pull/30#discussion_r133820300"},"pull_request":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/andela/learning-map-front/pulls/30","id":136340584,"html_url":"https://github.com/andela/learning-map-front/pull/30","diff_url":"https://github.com/andela/learning-map-front/pull/30.diff","patch_url":"https://github.com/andela/learning-map-front/pull/30.patch","issue_url":"https://api.github.com/repos/andela/learning-map-front/issues/30","number":30,"state":"open","locked":false,"title":"#150298750 Add axios header globally ","user":{"login":"andela-cofor","id":25608370,"avatar_url":"https://avatars2.githubusercontent.com/u/25608370?v=4","gravatar_id":"","url":"https://api.github.com/users/andela-cofor","html_url":"https://github.com/andela-cofor","followers_url":"https://api.github.com/users/andela-cofor/followers","following_url":"https://api.github.com/users/andela-cofor/following{/other_user}","gists_url":"https://api.github.com/users/andela-cofor/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-cofor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-cofor/subscriptions","organizations_url":"https://api.github.com/users/andela-cofor/orgs","repos_url":"https://api.github.com/users/andela-cofor/repos","events_url":"https://api.github.com/users/andela-cofor/events{/privacy}","received_events_url":"https://api.github.com/users/andela-cofor/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nAdds axios header globally\r\n\r\n#### Description of Task to be completed?\r\n- Create a helper function to return jwt-token\r\n- Add axios header globally on contributionAction file\r\n- Make axios requests to the backend\r\n\r\n#### How should this be manually tested?\r\nAfter cloning the repository and installing the required dependencies using \r\n* Run `yarn install`\r\n* Run  `npm run start:dev -s`\r\n\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories?\r\n[#150298750 ](https://www.pivotaltracker.com/story/show/150298750)\r\n\r\n#### Screenshots (if appropriate)\r\nN/A\r\n\r\n#### Questions\r\nN/A\r\n","created_at":"2017-08-17T19:59:47Z","updated_at":"2017-08-17T20:29:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"265f15bd1bf1aa84639310fcb22e6c35b0102986","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/learning-map-front/pulls/30/commits","review_comments_url":"https://api.github.com/repos/andela/learning-map-front/pulls/30/comments","review_comment_url":"https://api.github.com/repos/andela/learning-map-front/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/learning-map-front/issues/30/comments","statuses_url":"https://api.github.com/repos/andela/learning-map-front/statuses/0bb201fd950bee1f0b925f813010dcc886ed07bb","head":{"label":"andela:ch-append-jwt-to-every-request-150298750","ref":"ch-append-jwt-to-every-request-150298750","sha":"0bb201fd950bee1f0b925f813010dcc886ed07bb","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":94885920,"name":"learning-map-front","full_name":"andela/learning-map-front","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/learning-map-front","description":null,"fork":false,"url":"https://api.github.com/repos/andela/learning-map-front","forks_url":"https://api.github.com/repos/andela/learning-map-front/forks","keys_url":"https://api.github.com/repos/andela/learning-map-front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/learning-map-front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/learning-map-front/teams","hooks_url":"https://api.github.com/repos/andela/learning-map-front/hooks","issue_events_url":"https://api.github.com/repos/andela/learning-map-front/issues/events{/number}","events_url":"https://api.github.com/repos/andela/learning-map-front/events","assignees_url":"https://api.github.com/repos/andela/learning-map-front/assignees{/user}","branches_url":"https://api.github.com/repos/andela/learning-map-front/branches{/branch}","tags_url":"https://api.github.com/repos/andela/learning-map-front/tags","blobs_url":"https://api.github.com/repos/andela/learning-map-front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/learning-map-front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/learning-map-front/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/learning-map-front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/learning-map-front/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/learning-map-front/languages","stargazers_url":"https://api.github.com/repos/andela/learning-map-front/stargazers","contributors_url":"https://api.github.com/repos/andela/learning-map-front/contributors","subscribers_url":"https://api.github.com/repos/andela/learning-map-front/subscribers","subscription_url":"https://api.github.com/repos/andela/learning-map-front/subscription","commits_url":"https://api.github.com/repos/andela/learning-map-front/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/learning-map-front/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/learning-map-front/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/learning-map-front/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/learning-map-front/contents/{+path}","compare_url":"https://api.github.com/repos/andela/learning-map-front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/learning-map-front/merges","archive_url":"https://api.github.com/repos/andela/learning-map-front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/learning-map-front/downloads","issues_url":"https://api.github.com/repos/andela/learning-map-front/issues{/number}","pulls_url":"https://api.github.com/repos/andela/learning-map-front/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/learning-map-front/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/learning-map-front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/learning-map-front/labels{/name}","releases_url":"https://api.github.com/repos/andela/learning-map-front/releases{/id}","deployments_url":"https://api.github.com/repos/andela/learning-map-front/deployments","created_at":"2017-06-20T11:51:43Z","updated_at":"2017-07-27T14:47:36Z","pushed_at":"2017-08-17T20:23:46Z","git_url":"git://github.com/andela/learning-map-front.git","ssh_url":"git@github.com:andela/learning-map-front.git","clone_url":"https://github.com/andela/learning-map-front.git","svn_url":"https://github.com/andela/learning-map-front","homepage":null,"size":5136,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"14b8023849a9f4a9d6c6e10ecd9948fa89936d93","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":94885920,"name":"learning-map-front","full_name":"andela/learning-map-front","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/learning-map-front","description":null,"fork":false,"url":"https://api.github.com/repos/andela/learning-map-front","forks_url":"https://api.github.com/repos/andela/learning-map-front/forks","keys_url":"https://api.github.com/repos/andela/learning-map-front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/learning-map-front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/learning-map-front/teams","hooks_url":"https://api.github.com/repos/andela/learning-map-front/hooks","issue_events_url":"https://api.github.com/repos/andela/learning-map-front/issues/events{/number}","events_url":"https://api.github.com/repos/andela/learning-map-front/events","assignees_url":"https://api.github.com/repos/andela/learning-map-front/assignees{/user}","branches_url":"https://api.github.com/repos/andela/learning-map-front/branches{/branch}","tags_url":"https://api.github.com/repos/andela/learning-map-front/tags","blobs_url":"https://api.github.com/repos/andela/learning-map-front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/learning-map-front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/learning-map-front/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/learning-map-front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/learning-map-front/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/learning-map-front/languages","stargazers_url":"https://api.github.com/repos/andela/learning-map-front/stargazers","contributors_url":"https://api.github.com/repos/andela/learning-map-front/contributors","subscribers_url":"https://api.github.com/repos/andela/learning-map-front/subscribers","subscription_url":"https://api.github.com/repos/andela/learning-map-front/subscription","commits_url":"https://api.github.com/repos/andela/learning-map-front/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/learning-map-front/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/learning-map-front/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/learning-map-front/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/learning-map-front/contents/{+path}","compare_url":"https://api.github.com/repos/andela/learning-map-front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/learning-map-front/merges","archive_url":"https://api.github.com/repos/andela/learning-map-front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/learning-map-front/downloads","issues_url":"https://api.github.com/repos/andela/learning-map-front/issues{/number}","pulls_url":"https://api.github.com/repos/andela/learning-map-front/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/learning-map-front/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/learning-map-front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/learning-map-front/labels{/name}","releases_url":"https://api.github.com/repos/andela/learning-map-front/releases{/id}","deployments_url":"https://api.github.com/repos/andela/learning-map-front/deployments","created_at":"2017-06-20T11:51:43Z","updated_at":"2017-07-27T14:47:36Z","pushed_at":"2017-08-17T20:23:46Z","git_url":"git://github.com/andela/learning-map-front.git","ssh_url":"git@github.com:andela/learning-map-front.git","clone_url":"https://github.com/andela/learning-map-front.git","svn_url":"https://github.com/andela/learning-map-front","homepage":null,"size":5136,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/30"},"html":{"href":"https://github.com/andela/learning-map-front/pull/30"},"issue":{"href":"https://api.github.com/repos/andela/learning-map-front/issues/30"},"comments":{"href":"https://api.github.com/repos/andela/learning-map-front/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/learning-map-front/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/andela/learning-map-front/statuses/0bb201fd950bee1f0b925f813010dcc886ed07bb"}}}}
{"actor":{"display_login":"BolajiOlajide"}}