{"action":"created","issue":{"url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/37","repository_url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection","labels_url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/37/comments","events_url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/37/events","html_url":"https://github.com/dstnbrkr/VCRURLConnection/pull/37","id":238339917,"number":37,"title":"Support multiple requests for the same url","user":{"login":"haitaoli","id":280811,"avatar_url":"https://avatars3.githubusercontent.com/u/280811?v=3","gravatar_id":"","url":"https://api.github.com/users/haitaoli","html_url":"https://github.com/haitaoli","followers_url":"https://api.github.com/users/haitaoli/followers","following_url":"https://api.github.com/users/haitaoli/following{/other_user}","gists_url":"https://api.github.com/users/haitaoli/gists{/gist_id}","starred_url":"https://api.github.com/users/haitaoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haitaoli/subscriptions","organizations_url":"https://api.github.com/users/haitaoli/orgs","repos_url":"https://api.github.com/users/haitaoli/repos","events_url":"https://api.github.com/users/haitaoli/events{/privacy}","received_events_url":"https://api.github.com/users/haitaoli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-24T19:59:38Z","updated_at":"2017-06-29T01:26:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/pulls/37","html_url":"https://github.com/dstnbrkr/VCRURLConnection/pull/37","diff_url":"https://github.com/dstnbrkr/VCRURLConnection/pull/37.diff","patch_url":"https://github.com/dstnbrkr/VCRURLConnection/pull/37.patch"},"body":"## Summary\r\nThis PR addresses issue https://github.com/dstnbrkr/VCRURLConnection/issues/33.\r\n\r\n* Recordings are now saved in an array for each url+method key.\r\n* After a recording is replayed, it's removed from array. The last recording in the array is not removed, to maintain compatibility with current behavior.\r\n\r\nIf `VCR` is in both recording and replaying mode, the replayed recording is added back to the queue. This behavior doesn't make a difference when there is only one recording per url. But when there are multiple responses, this creates a \"loop\". For example, responses `A` and `B` are in the array, the replay sequence becomes `A`, `B`, `A`, `B` etc. If `VCR` is only in replay mode, then the replayed sequence is `A`, `B`, `B`, `B`..."},"comment":{"url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/comments/311836598","html_url":"https://github.com/dstnbrkr/VCRURLConnection/pull/37#issuecomment-311836598","issue_url":"https://api.github.com/repos/dstnbrkr/VCRURLConnection/issues/37","id":311836598,"user":{"login":"dstnbrkr","id":32656,"avatar_url":"https://avatars0.githubusercontent.com/u/32656?v=3","gravatar_id":"","url":"https://api.github.com/users/dstnbrkr","html_url":"https://github.com/dstnbrkr","followers_url":"https://api.github.com/users/dstnbrkr/followers","following_url":"https://api.github.com/users/dstnbrkr/following{/other_user}","gists_url":"https://api.github.com/users/dstnbrkr/gists{/gist_id}","starred_url":"https://api.github.com/users/dstnbrkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstnbrkr/subscriptions","organizations_url":"https://api.github.com/users/dstnbrkr/orgs","repos_url":"https://api.github.com/users/dstnbrkr/repos","events_url":"https://api.github.com/users/dstnbrkr/events{/privacy}","received_events_url":"https://api.github.com/users/dstnbrkr/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T01:26:36Z","updated_at":"2017-06-29T01:26:36Z","body":"The replaying:(BOOL) parameter makes the logic a little complex. What if instead there was no replaying parameter? Looks like that would be possible if `recordingForRequestKey:` used an index instead of mutating the recordings array. For instance, recordingForRequestKey could just increment an index and use `index++ % [recordings count]` to cycle through each recording for each request. Might make the test cases simpler too since you won't need to account for different behaviors depending on replaying/recording."}}
{"actor":{"display_login":"dstnbrkr"}}