Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I register the axios httpmodule module globally? #214

Closed
1 task done
PanHywel opened this issue Nov 4, 2021 · 1 comment
Closed
1 task done

How do I register the axios httpmodule module globally? #214

PanHywel opened this issue Nov 4, 2021 · 1 comment

Comments

@PanHywel
Copy link

PanHywel commented Nov 4, 2021

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

How do I register the axios httpmodule module globally?

Describe the solution you'd like

@Module({
  imports: [
    HttpModule.register({
      timeout: 5000,
      maxRedirects: 5,
      httpsAgent: new Agent({
        rejectUnauthorized: false
      }),
      transformResponse: [
        function (data) {
          // Dols whatever you want to transform the data
          return _json.parse(data);
        }
      ]
    })
  ],
  providers: [RequestService],
  exports: [RedisService]
})
expor

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

Easy to call

@kamilmysliwiec
Copy link
Member

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.

@nestjs nestjs locked and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants