{"action":"created","issue":{"url":"https://api.github.com/repos/cyclejs/cyclejs/issues/355","repository_url":"https://api.github.com/repos/cyclejs/cyclejs","labels_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/355/comments","events_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/355/events","html_url":"https://github.com/cyclejs/cyclejs/issues/355","id":165961040,"number":355,"title":"Cannot cancel an XMLHttpRequest in @cycle/http","user":{"login":"artfuldev","id":3091087,"avatar_url":"https://avatars.githubusercontent.com/u/3091087?v=3","gravatar_id":"","url":"https://api.github.com/users/artfuldev","html_url":"https://github.com/artfuldev","followers_url":"https://api.github.com/users/artfuldev/followers","following_url":"https://api.github.com/users/artfuldev/following{/other_user}","gists_url":"https://api.github.com/users/artfuldev/gists{/gist_id}","starred_url":"https://api.github.com/users/artfuldev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artfuldev/subscriptions","organizations_url":"https://api.github.com/users/artfuldev/orgs","repos_url":"https://api.github.com/users/artfuldev/repos","events_url":"https://api.github.com/users/artfuldev/events{/privacy}","received_events_url":"https://api.github.com/users/artfuldev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cyclejs/cyclejs/labels/issue%20is%20bug","name":"issue is bug","color":"FF0000"},{"url":"https://api.github.com/repos/cyclejs/cyclejs/labels/scope:%20http","name":"scope: http","color":"bfd4f2"},{"url":"https://api.github.com/repos/cyclejs/cyclejs/labels/weight%203%20(should)","name":"weight 3 (should)","color":"888888"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-17T05:16:27Z","updated_at":"2016-07-20T14:34:26Z","closed_at":null,"body":"With the addition of the runStreamAdapter, there is a default listener added, which takes away the ability to cancel XHRs."},"comment":{"url":"https://api.github.com/repos/cyclejs/cyclejs/issues/comments/233967964","html_url":"https://github.com/cyclejs/cyclejs/issues/355#issuecomment-233967964","issue_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/355","id":233967964,"user":{"login":"staltz","id":90512,"avatar_url":"https://avatars.githubusercontent.com/u/90512?v=3","gravatar_id":"","url":"https://api.github.com/users/staltz","html_url":"https://github.com/staltz","followers_url":"https://api.github.com/users/staltz/followers","following_url":"https://api.github.com/users/staltz/following{/other_user}","gists_url":"https://api.github.com/users/staltz/gists{/gist_id}","starred_url":"https://api.github.com/users/staltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staltz/subscriptions","organizations_url":"https://api.github.com/users/staltz/orgs","repos_url":"https://api.github.com/users/staltz/repos","events_url":"https://api.github.com/users/staltz/events{/privacy}","received_events_url":"https://api.github.com/users/staltz/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T14:34:26Z","updated_at":"2016-07-20T14:34:26Z","body":"Yeah, you're right, the driver's noop listener is a problem. So far we know these requirements for sure:\r\n\r\n- POST request without a response$ listener should execute no matter what\r\n- If the above has a `cancelWhen` field, then it should execute until the cancellation stream emits\r\n\r\nHere's another addition to the proposal:\r\n\r\n```diff\r\n  let request$ = xs.of({\r\n    url: 'http://localhost:8080/hello',\r\n    method: 'POST',\r\n    category: 'hello',\r\n-   cancelWhen: xs.periodic(2000).take(1),\r\n+   cancelWhen: () => xs.periodic(2000).take(1),\r\n  });\r\n```\r\n\r\nWhich would enable:\r\n```js\r\n  let request$ = xs.of({\r\n    url: 'http://localhost:8080/hello',\r\n    method: 'POST',\r\n    category: 'hello',\r\n    // cancel when the next request happens\r\n    // (without drop(1) it would cancel as soon as THIS request happens)\r\n    cancelWhen: () => request$.drop(1),\r\n  });\r\n```\r\n"}}
{"actor":{"display_login":"staltz"}}