diff --git a/lib/http.module.ts b/lib/http.module.ts index a26a86b..e2d6ad1 100644 --- a/lib/http.module.ts +++ b/lib/http.module.ts @@ -15,7 +15,7 @@ import { import axiosRetry from 'axios-retry'; import axiosBetterStacktrace from 'axios-better-stacktrace'; -const createAxiosInstance = (config: HttpModuleOptions) => { +const createAxiosRetry = (config?: HttpModuleOptions) => { const axiosInstance = Axios.create(config); axiosRetry(axiosInstance, config); axiosBetterStacktrace(axiosInstance); @@ -27,7 +27,7 @@ const createAxiosInstance = (config: HttpModuleOptions) => { HttpService, { provide: AXIOS_INSTANCE_TOKEN, - useValue: Axios, + useValue: createAxiosRetry(), }, ], exports: [HttpService], diff --git a/package.json b/package.json index 61ef73d..da41585 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-http-promise", - "version": "1.1.0", + "version": "1.1.1", "keywords": [ "nestjs", "http",