{"action":"opened","issue":{"url":"https://api.github.com/repos/nestjs/nest/issues/1098","repository_url":"https://api.github.com/repos/nestjs/nest","labels_url":"https://api.github.com/repos/nestjs/nest/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/nestjs/nest/issues/1098/comments","events_url":"https://api.github.com/repos/nestjs/nest/issues/1098/events","html_url":"https://github.com/nestjs/nest/issues/1098","id":361393163,"node_id":"MDU6SXNzdWUzNjEzOTMxNjM=","number":1098,"title":"Failed to register multiples HttpModule","user":{"login":"murilopl","id":13990333,"node_id":"MDQ6VXNlcjEzOTkwMzMz","avatar_url":"https://avatars0.githubusercontent.com/u/13990333?v=4","gravatar_id":"","url":"https://api.github.com/users/murilopl","html_url":"https://github.com/murilopl","followers_url":"https://api.github.com/users/murilopl/followers","following_url":"https://api.github.com/users/murilopl/following{/other_user}","gists_url":"https://api.github.com/users/murilopl/gists{/gist_id}","starred_url":"https://api.github.com/users/murilopl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murilopl/subscriptions","organizations_url":"https://api.github.com/users/murilopl/orgs","repos_url":"https://api.github.com/users/murilopl/repos","events_url":"https://api.github.com/users/murilopl/events{/privacy}","received_events_url":"https://api.github.com/users/murilopl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-18T16:48:53Z","updated_at":"2018-09-18T16:48:53Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n<!-- \r\nPlease search GitHub for a similar issue or PR before submitting.\r\nCheck one of the following options with \"x\" -->\r\n<pre><code>\r\n[ ] Regression <!--(a behavior that used to work and stopped working in a new release)-->\r\n[x] Bug report\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.\r\n</code></pre>\r\n\r\n## Current behavior\r\n<!-- Describe how the issue manifests. -->\r\nWhen the HttpModule is imported into multiple modules, the first record of it overlaps all others, as if it were global.\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\nEach record gets stuck in its context.\r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!-- Please share a repo, a gist, or step-by-step instructions. -->\r\n```typescript\r\n@Module({\r\n    imports: [\r\n        AModule,\r\n        BModule,\r\n    ],\r\n})\r\nexport class AppModule {}\r\n```\r\n```typescript\r\n@Module({\r\n    imports: [\r\n        HttpModule.register({\r\n            baseUrl: 'http://a.com',\r\n        }),\r\n    ],\r\n    providers: [AService],\r\n    exports: [AService],\r\n})\r\nexport class AModule {}\r\n```\r\n```typescript\r\n@Module({\r\n    imports: [\r\n        HttpModule.register({\r\n            baseUrl: 'http://b.com',\r\n        }),\r\n    ],\r\n    providers: [BService],\r\n    exports: [BService],\r\n})\r\nexport class BModule {}\r\n```\r\n\r\nMake request with HttpService in AService with this.http.get('/whatever'):\r\n- Final url: a.com/whetever\r\n\r\nMake request with HttpService in BService with this.http.get('/whatever'):\r\n- Final url: **a**.com/whetever `expected b.com/whatever`\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n<!-- Describe the motivation or the concrete use case. -->\r\nCreation of multiple services that connects to other apis.\r\nExample:\r\nFirstExternalApiModule -> FirstExternalApiService -> Http request -> First external api\r\nSecondExternalApiModule -> SecondExternalApiService -> Http request -> Second external api\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nNest version: v5.3.7\r\n<!-- Check whether this is still an issue in the most recent Nest version -->\r\n \r\nFor Tooling issues:\r\n- Node version: v10.0.0  <!-- run `node --version` -->\r\n- Platform:  Mac <!-- Mac, Linux, Windows -->\r\n\r\n<!-- Others: -->\r\n<!-- Anything else relevant?  Operating system version, IDE, package manager, ... -->\r\n</code></pre>\r\n"}}
{"actor":{"display_login":"murilopl"}}