{"action":"created","issue":{"url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/34","labels_url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/34/comments","events_url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/34/events","html_url":"https://github.com/cyclejs/cycle-http-driver/issues/34","id":128149382,"number":34,"title":"Eager setting in request should always override setting of the driver","user":{"login":"arnodenuijl","id":1770335,"avatar_url":"https://avatars.githubusercontent.com/u/1770335?v=3","gravatar_id":"","url":"https://api.github.com/users/arnodenuijl","html_url":"https://github.com/arnodenuijl","followers_url":"https://api.github.com/users/arnodenuijl/followers","following_url":"https://api.github.com/users/arnodenuijl/following{/other_user}","gists_url":"https://api.github.com/users/arnodenuijl/gists{/gist_id}","starred_url":"https://api.github.com/users/arnodenuijl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnodenuijl/subscriptions","organizations_url":"https://api.github.com/users/arnodenuijl/orgs","repos_url":"https://api.github.com/users/arnodenuijl/repos","events_url":"https://api.github.com/users/arnodenuijl/events{/privacy}","received_events_url":"https://api.github.com/users/arnodenuijl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-22T12:41:34Z","updated_at":"2016-01-23T09:19:58Z","closed_at":null,"body":"At this moment you can set ```eager``` when you create the driver and you can set ```eager``` in the request. \r\n  When ```eager``` is set to ```false``` in the driver you can force it to ```true``` in the request. \r\n  But when ```eager``` is set to ```true``` in the driver you cannot override it to ```false``` in the request. \r\n  \r\n  I would expect explicitely setting ```eager``` to either ```true``` or ```false``` in the request to always override \r\n  whatever the setting is in the driver. Is this assumption correct? If so, i would like to create a pull request to \r\n  fix this. Might need some help because this would by me first pull request for an open source project. \r\n  \r\n  So the resulting behavior from all the possible settings would be as follows:\r\n  \r\n  Eager setting driver | Eager setting request | result\r\n  -------------- | --------------- | ------\r\n  not explicitly set | not explicitly set | not eager *(default of the driver)*\r\n  not explicitly set | true | eager\r\n  not explicitly set | false | not eager\r\n  true | not explicitly set | eager *(driver setting)*\r\n  true | true | eager\r\n  true | false | not eager *(request setting always overrides driver setting)*\r\n  false | not explicitly set | not eager *(driver setting)*\r\n  false | true | eager *(request setting always overrides driver setting)*\r\n  false | false | not eager \r\n \r\nUnit test to show behavior:\r\n```\r\n  it('should not auto-execute HTTP request when factory gets eager = true but the requests explicitly overrides with eager = false',\r\n    function(done) {\r\n      var request$ = Rx.Observable.just({\r\n        url: uri + '/pet',\r\n        method: 'POST',\r\n        send: {name: 'Woof', species: 'Dog'},\r\n        eager: false\r\n      });\r\n      var httpDriver = makeHTTPDriver({eager: true});\r\n      globalSandbox.petPOSTResponse = null;\r\n      httpDriver(request$);\r\n      setTimeout(function () {\r\n        assert.strictEqual(globalSandbox.petPOSTResponse, null);\r\n        done();\r\n      }, 100);\r\n    }\r\n  );\r\n```"},"comment":{"url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/comments/174165320","html_url":"https://github.com/cyclejs/cycle-http-driver/issues/34#issuecomment-174165320","issue_url":"https://api.github.com/repos/cyclejs/cycle-http-driver/issues/34","id":174165320,"user":{"login":"whitecolor","id":736697,"avatar_url":"https://avatars.githubusercontent.com/u/736697?v=3","gravatar_id":"","url":"https://api.github.com/users/whitecolor","html_url":"https://github.com/whitecolor","followers_url":"https://api.github.com/users/whitecolor/followers","following_url":"https://api.github.com/users/whitecolor/following{/other_user}","gists_url":"https://api.github.com/users/whitecolor/gists{/gist_id}","starred_url":"https://api.github.com/users/whitecolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitecolor/subscriptions","organizations_url":"https://api.github.com/users/whitecolor/orgs","repos_url":"https://api.github.com/users/whitecolor/repos","events_url":"https://api.github.com/users/whitecolor/events{/privacy}","received_events_url":"https://api.github.com/users/whitecolor/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T09:19:58Z","updated_at":"2016-01-23T09:19:58Z","body":"probably\r\n```\r\nreqOptions.hasOwnProperty('eager')\r\n  ? reqOptions.eager : eager\r\n```"}}