@@ -147,18 +147,18 @@ export class AnotherService {
147147You can customize logging and request/response interceptors by providing ` logger ` and ` config ` options during module initialization.
148148
149149``` typescript
150- import { Logger } from ' @nestjs/common' ;
151- import { Module } from ' @nestjs/common' ;
152- import { HttpModule } from ' @nodeflip/nest-axios-http' ;
150+ import { Logger } from " @nestjs/common" ;
151+ import { Module } from " @nestjs/common" ;
152+ import { HttpModule } from " @nodeflip/nest-axios-http" ;
153153
154- const customLogger = new Logger (' CustomLogger' );
154+ const customLogger = new Logger (" CustomLogger" );
155155
156156@Module ({
157157 imports: [
158158 HttpModule .forRoot ({
159- logger: customLogger , // Custom logger instance
159+ logger: customLogger , // Custom logger instance
160160 config: {
161- baseURL: ' https://api.example.com' ,
161+ baseURL: " https://api.example.com" ,
162162 enableLogging: true ,
163163 onRequest : (config ) => {
164164 // Customize request logging or modifications
@@ -177,21 +177,22 @@ const customLogger = new Logger('CustomLogger');
177177 ],
178178})
179179export class AppModule {}
180+
180181```
181182### Configuring Multiple HTTP Services
182183
183184You can configure multiple HTTP services using an array of options with forFeature.
184185``` typescript
185- import { Module } from ' @nestjs/common' ;
186- import { HttpModule } from ' @nodeflip/nest-axios-http' ;
186+ import { Module } from " @nestjs/common" ;
187+ import { HttpModule } from " @nodeflip/nest-axios-http" ;
187188
188189@Module ({
189190 imports: [
190191 HttpModule .forFeature ([
191192 {
192- serviceName: " HTTP_SERVICE_2" ,
193+ serviceName: " HTTP_SERVICE_2" ,
193194 config: {
194- baseURL: ' https://api.service1.com' ,
195+ baseURL: " https://api.service1.com" ,
195196 enableLogging: true ,
196197 onRequest : (config ) => {
197198 // Optional: Customize request logging or modifications
@@ -208,9 +209,9 @@ import { HttpModule } from '@nodeflip/nest-axios-http';
208209 },
209210 },
210211 {
211- serviceName: " HTTP_SERVICE_2" ,
212+ serviceName: " HTTP_SERVICE_2" ,
212213 config: {
213- baseURL: ' https://api.service2.com' ,
214+ baseURL: " https://api.service2.com" ,
214215 enableLogging: true ,
215216 onRequest : (config ) => {
216217 // Optional: Customize request logging or modifications
0 commit comments