{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/3058","repository_url":"https://api.github.com/repos/request/request","labels_url":"https://api.github.com/repos/request/request/issues/3058/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/3058/comments","events_url":"https://api.github.com/repos/request/request/issues/3058/events","html_url":"https://github.com/request/request/issues/3058","id":381466241,"node_id":"MDU6SXNzdWUzODE0NjYyNDE=","number":3058,"title":"can't catch internet disconnection event while downloading big files","user":{"login":"Dengue","id":5842045,"node_id":"MDQ6VXNlcjU4NDIwNDU=","avatar_url":"https://avatars2.githubusercontent.com/u/5842045?v=4","gravatar_id":"","url":"https://api.github.com/users/Dengue","html_url":"https://github.com/Dengue","followers_url":"https://api.github.com/users/Dengue/followers","following_url":"https://api.github.com/users/Dengue/following{/other_user}","gists_url":"https://api.github.com/users/Dengue/gists{/gist_id}","starred_url":"https://api.github.com/users/Dengue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dengue/subscriptions","organizations_url":"https://api.github.com/users/Dengue/orgs","repos_url":"https://api.github.com/users/Dengue/repos","events_url":"https://api.github.com/users/Dengue/events{/privacy}","received_events_url":"https://api.github.com/users/Dengue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-16T06:35:02Z","updated_at":"2018-12-06T17:12:41Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nI have to download a big file from remote server, but my connection is not stable. Actually it can disconnect after 10 minutes and then autoatically reconnect. As the result of such reconnection downloading proccess stops and I can't catch any errors or events programatically.\r\nHere is exmaple of code that I use:\r\n\r\n`const request = require('request')\r\nrequest({\r\n  uri: `${pathToRemoteFile}`,\r\n  encoding: null\r\n}).on('error', err => console.log(err))\r\n.pipe(fs.createWriteStream(`${pathToStoreFileLocally}`))\r\n.on('finish', () => { console.log('yeah, successfully downloaded') })\r\n.on('error', err => console.log(err))`\r\n\r\nSo for example if I need to download 500MB file, and I have already downloaded for example 100MB and suddenly I lost internet connection so the file will not be downloaded anymore and no errors will raise.\r\n\r\nMaybe I missed something?"},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/444951746","html_url":"https://github.com/request/request/issues/3058#issuecomment-444951746","issue_url":"https://api.github.com/repos/request/request/issues/3058","id":444951746,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDk1MTc0Ng==","user":{"login":"zahi111","id":22049781,"node_id":"MDQ6VXNlcjIyMDQ5Nzgx","avatar_url":"https://avatars2.githubusercontent.com/u/22049781?v=4","gravatar_id":"","url":"https://api.github.com/users/zahi111","html_url":"https://github.com/zahi111","followers_url":"https://api.github.com/users/zahi111/followers","following_url":"https://api.github.com/users/zahi111/following{/other_user}","gists_url":"https://api.github.com/users/zahi111/gists{/gist_id}","starred_url":"https://api.github.com/users/zahi111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zahi111/subscriptions","organizations_url":"https://api.github.com/users/zahi111/orgs","repos_url":"https://api.github.com/users/zahi111/repos","events_url":"https://api.github.com/users/zahi111/events{/privacy}","received_events_url":"https://api.github.com/users/zahi111/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T17:12:41Z","updated_at":"2018-12-06T17:12:41Z","author_association":"NONE","body":"Same.. "}}
{"actor":{"display_login":"zahi111"}}