Merge branch 'beta' of https://github.com/benhason1/nestjs-http-promise into beta
This commit is contained in:
commit
4c11592975
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ import {
|
||||||
} from './interfaces';
|
} from './interfaces';
|
||||||
import axiosRetry from 'axios-retry';
|
import axiosRetry from 'axios-retry';
|
||||||
|
|
||||||
const createAxiosRetry = (config: HttpModuleOptions) => {
|
const createAxiosRetry = (config?: HttpModuleOptions) => {
|
||||||
const axiosInstance = Axios.create(config);
|
const axiosInstance = Axios.create(config);
|
||||||
axiosRetry(axiosInstance, config);
|
axiosRetry(axiosInstance, config);
|
||||||
return axiosInstance;
|
return axiosInstance;
|
||||||
|
@ -25,7 +25,7 @@ const createAxiosRetry = (config: HttpModuleOptions) => {
|
||||||
HttpService,
|
HttpService,
|
||||||
{
|
{
|
||||||
provide: AXIOS_INSTANCE_TOKEN,
|
provide: AXIOS_INSTANCE_TOKEN,
|
||||||
useValue: Axios,
|
useValue: createAxiosRetry(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
exports: [HttpService],
|
exports: [HttpService],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "nestjs-http-promise",
|
"name": "nestjs-http-promise",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"nestjs",
|
"nestjs",
|
||||||
"http",
|
"http",
|
||||||
|
|
Loading…
Reference in a new issue