{"action":"created","issue":{"url":"https://api.github.com/repos/request/request-promise/issues/212","repository_url":"https://api.github.com/repos/request/request-promise","labels_url":"https://api.github.com/repos/request/request-promise/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/request/request-promise/issues/212/comments","events_url":"https://api.github.com/repos/request/request-promise/issues/212/events","html_url":"https://github.com/request/request-promise/issues/212","id":247118111,"number":212,"title":"Requests in loop return the same response multiple times","user":{"login":"chasehaddleton","id":6833180,"avatar_url":"https://avatars3.githubusercontent.com/u/6833180?v=4","gravatar_id":"","url":"https://api.github.com/users/chasehaddleton","html_url":"https://github.com/chasehaddleton","followers_url":"https://api.github.com/users/chasehaddleton/followers","following_url":"https://api.github.com/users/chasehaddleton/following{/other_user}","gists_url":"https://api.github.com/users/chasehaddleton/gists{/gist_id}","starred_url":"https://api.github.com/users/chasehaddleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chasehaddleton/subscriptions","organizations_url":"https://api.github.com/users/chasehaddleton/orgs","repos_url":"https://api.github.com/users/chasehaddleton/repos","events_url":"https://api.github.com/users/chasehaddleton/events{/privacy}","received_events_url":"https://api.github.com/users/chasehaddleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-01T15:56:28Z","updated_at":"2017-08-01T16:36:20Z","closed_at":null,"body":"I have the following code which loops through a list of accounts and makes a request per account (let's say there are n number of accounts). The returned promise is then pushed to an array which is later Promise.all'd. The issue is that the response array that is returned contains n responses, all of which correspond to the last request which was pushed to the array. \r\n\r\nCode example (lines 26 is around where the issue presents)\r\nhttps://gist.github.com/chasehaddleton/39b54bb222e2e9e07195cf50d2b86de9\r\n\r\nAm I using request-promise incorrectly, or is it an issue with the library itself? "},"comment":{"url":"https://api.github.com/repos/request/request-promise/issues/comments/319425838","html_url":"https://github.com/request/request-promise/issues/212#issuecomment-319425838","issue_url":"https://api.github.com/repos/request/request-promise/issues/212","id":319425838,"user":{"login":"analog-nico","id":1407390,"avatar_url":"https://avatars1.githubusercontent.com/u/1407390?v=4","gravatar_id":"","url":"https://api.github.com/users/analog-nico","html_url":"https://github.com/analog-nico","followers_url":"https://api.github.com/users/analog-nico/followers","following_url":"https://api.github.com/users/analog-nico/following{/other_user}","gists_url":"https://api.github.com/users/analog-nico/gists{/gist_id}","starred_url":"https://api.github.com/users/analog-nico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analog-nico/subscriptions","organizations_url":"https://api.github.com/users/analog-nico/orgs","repos_url":"https://api.github.com/users/analog-nico/repos","events_url":"https://api.github.com/users/analog-nico/events{/privacy}","received_events_url":"https://api.github.com/users/analog-nico/received_events","type":"User","site_admin":false},"created_at":"2017-08-01T16:36:19Z","updated_at":"2017-08-01T16:36:19Z","body":"The code looks perfect! You should broaden your search range for the bug. I would start to look into the options you pass and whether they really all point to different accounts. Then I would look at your server and check what they receive and so on."}}
{"actor":{"display_login":"analog-nico"}}