{"action":"created","issue":{"url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/19","repository_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest","labels_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/19/comments","events_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/19/events","html_url":"https://github.com/troyanskiy/ng2-resource-rest/issues/19","id":158661552,"number":19,"title":"Using custom Http component","user":{"login":"bozhidarc","id":323252,"avatar_url":"https://avatars.githubusercontent.com/u/323252?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidarc","html_url":"https://github.com/bozhidarc","followers_url":"https://api.github.com/users/bozhidarc/followers","following_url":"https://api.github.com/users/bozhidarc/following{/other_user}","gists_url":"https://api.github.com/users/bozhidarc/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidarc/subscriptions","organizations_url":"https://api.github.com/users/bozhidarc/orgs","repos_url":"https://api.github.com/users/bozhidarc/repos","events_url":"https://api.github.com/users/bozhidarc/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidarc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-06T12:02:21Z","updated_at":"2016-06-06T13:06:54Z","closed_at":null,"body":"I have my own Http class with name AppHttp which extends from Http.\r\nI found in your code that add2Provides property controls if my resource class is added to the app providers with an instance of the original Http class, so I set it to false, but here comes the problem.\r\nWhen it is false and In the mine implementation of the Resource class i override its constructor and inject  mine Http implementation AppHttp is called twice. The first time it is called with proper backend and defaultOptions arguments but the second time is called with empty backend and defaultOptions which results in the following error `TypeError: backend.createConnection is not a function`.\r\n\r\nWhat is the right way to use the ng2-resource-rest with mine custom Http implemtation?\r\n\r\n```\r\nconstructor(protected http: AppHttp) {\r\n        super(http);\r\n     }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/comments/223953083","html_url":"https://github.com/troyanskiy/ng2-resource-rest/issues/19#issuecomment-223953083","issue_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/19","id":223953083,"user":{"login":"bozhidarc","id":323252,"avatar_url":"https://avatars.githubusercontent.com/u/323252?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidarc","html_url":"https://github.com/bozhidarc","followers_url":"https://api.github.com/users/bozhidarc/followers","following_url":"https://api.github.com/users/bozhidarc/following{/other_user}","gists_url":"https://api.github.com/users/bozhidarc/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidarc/subscriptions","organizations_url":"https://api.github.com/users/bozhidarc/orgs","repos_url":"https://api.github.com/users/bozhidarc/repos","events_url":"https://api.github.com/users/bozhidarc/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidarc/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T13:06:54Z","updated_at":"2016-06-06T13:06:54Z","body":"I found a solution! In my resource class, I inject the standard Http class after that I casting it to mine AppHttp and then I pass it to the parent constructor."}}
{"actor":{"display_login":"bozhidarc"}}