{"action":"closed","issue":{"url":"https://api.github.com/repos/wepay/Ruby-SDK/issues/10","labels_url":"https://api.github.com/repos/wepay/Ruby-SDK/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/wepay/Ruby-SDK/issues/10/comments","events_url":"https://api.github.com/repos/wepay/Ruby-SDK/issues/10/events","html_url":"https://github.com/wepay/Ruby-SDK/issues/10","id":71431872,"number":10,"title":"Add authorization header correctly","user":{"login":"biplap-sarkar","id":898325,"avatar_url":"https://avatars.githubusercontent.com/u/898325?v=3","gravatar_id":"","url":"https://api.github.com/users/biplap-sarkar","html_url":"https://github.com/biplap-sarkar","followers_url":"https://api.github.com/users/biplap-sarkar/followers","following_url":"https://api.github.com/users/biplap-sarkar/following{/other_user}","gists_url":"https://api.github.com/users/biplap-sarkar/gists{/gist_id}","starred_url":"https://api.github.com/users/biplap-sarkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biplap-sarkar/subscriptions","organizations_url":"https://api.github.com/users/biplap-sarkar/orgs","repos_url":"https://api.github.com/users/biplap-sarkar/repos","events_url":"https://api.github.com/users/biplap-sarkar/events{/privacy}","received_events_url":"https://api.github.com/users/biplap-sarkar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T23:43:09Z","updated_at":"2015-04-29T20:02:25Z","closed_at":"2015-04-29T20:02:25Z","body":"Currently authorization header is added using \r\ncall.add_field('Authorization: Bearer', access_token);\r\n\r\nThis gives error sometimes with message suggesting authorization header should be of type Bearer when the header is not added correctly to the HTTP request\r\n\r\nUsing header name as 'Authorization' and passing the value 'Bearer <access_token>' works for me as following:-\r\ncall.add_field('Authorization', \"Bearer #{access_token}\");"}}