{"action":"created","issue":{"url":"https://api.github.com/repos/visionmedia/superagent/issues/1155","repository_url":"https://api.github.com/repos/visionmedia/superagent","labels_url":"https://api.github.com/repos/visionmedia/superagent/issues/1155/labels{/name}","comments_url":"https://api.github.com/repos/visionmedia/superagent/issues/1155/comments","events_url":"https://api.github.com/repos/visionmedia/superagent/issues/1155/events","html_url":"https://github.com/visionmedia/superagent/pull/1155","id":199914482,"number":1155,"title":"[WIP] add `Request.retry`","user":{"login":"popeindustries","id":725234,"avatar_url":"https://avatars.githubusercontent.com/u/725234?v=3","gravatar_id":"","url":"https://api.github.com/users/popeindustries","html_url":"https://github.com/popeindustries","followers_url":"https://api.github.com/users/popeindustries/followers","following_url":"https://api.github.com/users/popeindustries/following{/other_user}","gists_url":"https://api.github.com/users/popeindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/popeindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popeindustries/subscriptions","organizations_url":"https://api.github.com/users/popeindustries/orgs","repos_url":"https://api.github.com/users/popeindustries/repos","events_url":"https://api.github.com/users/popeindustries/events{/privacy}","received_events_url":"https://api.github.com/users/popeindustries/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-10T19:40:07Z","updated_at":"2017-01-12T19:13:57Z","closed_at":"2017-01-12T19:12:49Z","pull_request":{"url":"https://api.github.com/repos/visionmedia/superagent/pulls/1155","html_url":"https://github.com/visionmedia/superagent/pull/1155","diff_url":"https://github.com/visionmedia/superagent/pull/1155.diff","patch_url":"https://github.com/visionmedia/superagent/pull/1155.patch"},"body":"I'm just opening this early sketch to see if there is interest in adding a `Request.retry` method. I'm aware of [segmentio/superagent-retry](https://github.com/segmentio/superagent-retry), but it relies on some hacky behaviour to reset state between attempts, and doesn't seem to work with newer versions of `superagent`. There would seem to be quite a bit of resetting necessary to make this work properly for errors, timeouts, and aborts, so I think it might be better done as a core method rather than a plugin.\r\n\r\nIn any case, I'd be happy to work on adding this if there is interest.\r\n\r\nProgress:\r\n- [x] Node: retry for errors\r\n- [x] Node: retry for timeouts\r\n- [x] Browser: retry for errors\r\n- [x] Browser: retry for timeouts\r\n- [x] Node: retry with redirects\r\n- [x] refactor `end()` into 2 phases for \"lightweight\" retry?"},"comment":{"url":"https://api.github.com/repos/visionmedia/superagent/issues/comments/272254140","html_url":"https://github.com/visionmedia/superagent/pull/1155#issuecomment-272254140","issue_url":"https://api.github.com/repos/visionmedia/superagent/issues/1155","id":272254140,"user":{"login":"pornel","id":72159,"avatar_url":"https://avatars.githubusercontent.com/u/72159?v=3","gravatar_id":"","url":"https://api.github.com/users/pornel","html_url":"https://github.com/pornel","followers_url":"https://api.github.com/users/pornel/followers","following_url":"https://api.github.com/users/pornel/following{/other_user}","gists_url":"https://api.github.com/users/pornel/gists{/gist_id}","starred_url":"https://api.github.com/users/pornel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pornel/subscriptions","organizations_url":"https://api.github.com/users/pornel/orgs","repos_url":"https://api.github.com/users/pornel/repos","events_url":"https://api.github.com/users/pornel/events{/privacy}","received_events_url":"https://api.github.com/users/pornel/received_events","type":"User","site_admin":false},"created_at":"2017-01-12T19:13:57Z","updated_at":"2017-01-12T19:13:57Z","body":"Thank you. \r\n\r\nThe failures were only due to short timeouts in the test."}}
{"actor":{"display_login":"pornel"}}