Skip to content

Commit 986ad4e

Browse files
Merge pull request nestjs#1424 from quaternion/master
bugfix(common) add missing axios provider in HttpModule.registerAsync
2 parents 6204fe1 + 1212c60 commit 986ad4e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/common/http/http.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ export class HttpModule {
4747
imports: options.imports,
4848
providers: [
4949
...this.createAsyncProviders(options),
50+
{
51+
provide: AXIOS_INSTANCE_TOKEN,
52+
useFactory: (config: HttpModuleOptions) => Axios.create(config),
53+
inject: [HTTP_MODULE_OPTIONS],
54+
},
5055
{
5156
provide: HTTP_MODULE_ID,
5257
useValue: randomStringGenerator(),

0 commit comments

Comments
 (0)