HTTP Module
You might ever use Axios on JavaScript project development. Based on documentation, Nest wraps Axios, and implement it via HttpModule and HttpService. The difference I found is the result from HTTP responses is not directly JSONdata like we use Axios commonly but generate response as Observable.
Installation
You can install the application based on your package manager:
bash
$ npm install @nestjs/axios axiosbash
$ bun add @nestjs/axios axiosbash
$ pnpm add @nestjs/axios axiosbash
$ bun add @nestjs/axios axiosGetting Started
You need to add HttpModule on your related module.
ts
import { HttpModule } from '@nestjs/axios'
@Module({
imports: [
HttpModule, // Add http module on imports like the rest of modules
],
})
//