{"action":"created","issue":{"url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/13","repository_url":"https://api.github.com/repos/francois2metz/em-eventsource","labels_url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/13/comments","events_url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/13/events","html_url":"https://github.com/francois2metz/em-eventsource/issues/13","id":328416198,"node_id":"MDU6SXNzdWUzMjg0MTYxOTg=","number":13,"title":"Handle cross-origin redirection","user":{"login":"DriftingShadows","id":29883188,"node_id":"MDQ6VXNlcjI5ODgzMTg4","avatar_url":"https://avatars1.githubusercontent.com/u/29883188?v=4","gravatar_id":"","url":"https://api.github.com/users/DriftingShadows","html_url":"https://github.com/DriftingShadows","followers_url":"https://api.github.com/users/DriftingShadows/followers","following_url":"https://api.github.com/users/DriftingShadows/following{/other_user}","gists_url":"https://api.github.com/users/DriftingShadows/gists{/gist_id}","starred_url":"https://api.github.com/users/DriftingShadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DriftingShadows/subscriptions","organizations_url":"https://api.github.com/users/DriftingShadows/orgs","repos_url":"https://api.github.com/users/DriftingShadows/repos","events_url":"https://api.github.com/users/DriftingShadows/events{/privacy}","received_events_url":"https://api.github.com/users/DriftingShadows/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-06-01T07:50:32Z","updated_at":"2018-06-03T17:58:03Z","closed_at":null,"author_association":"NONE","body":"I'm trying to stream events from Nest as shown here: https://developers.nest.com/documentation/cloud/rest-streaming-guide\r\n\r\nIn general im doing:\r\n```\r\n      source = EventMachine::EventSource.new(event_url, query = {}, headers=\r\n                                            {'Authorization' => \"Bearer #{@token}\",\r\n                                            'Accept' => 'text/event-stream',\r\n                                            'Cache-Control' => 'no-cache' })\r\n```\r\nwhere event url is \"https://developer-api.nest.com/\". I get a 401 Unauthorized Error and is addressed by Nest at: https://developers.nest.com/documentation/cloud/how-to-handle-redirects which suggests that eventsource is not handling redirects properly. This is confirmed when I swap the event_url with the final redirect address and the stream works fine. Any way to add the ability to handle redirects to the library? Thanks alot!"},"comment":{"url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/comments/394179576","html_url":"https://github.com/francois2metz/em-eventsource/issues/13#issuecomment-394179576","issue_url":"https://api.github.com/repos/francois2metz/em-eventsource/issues/13","id":394179576,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE3OTU3Ng==","user":{"login":"francois2metz","id":86659,"node_id":"MDQ6VXNlcjg2NjU5","avatar_url":"https://avatars1.githubusercontent.com/u/86659?v=4","gravatar_id":"","url":"https://api.github.com/users/francois2metz","html_url":"https://github.com/francois2metz","followers_url":"https://api.github.com/users/francois2metz/followers","following_url":"https://api.github.com/users/francois2metz/following{/other_user}","gists_url":"https://api.github.com/users/francois2metz/gists{/gist_id}","starred_url":"https://api.github.com/users/francois2metz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francois2metz/subscriptions","organizations_url":"https://api.github.com/users/francois2metz/orgs","repos_url":"https://api.github.com/users/francois2metz/repos","events_url":"https://api.github.com/users/francois2metz/events{/privacy}","received_events_url":"https://api.github.com/users/francois2metz/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T17:58:03Z","updated_at":"2018-06-03T17:58:03Z","author_association":"OWNER","body":"I have released the version 0.2.5 which fix the issue."}}
{"actor":{"display_login":"francois2metz"}}