1.11.0 โข Published 8 months ago
@odg/axios v1.11.0
Table of Contents
๐ Benefits
- ๐ Speed performance Inversion of control
- ๐จ Code Quality
- ๐ Use Interface
- ๐งช Teste with 100% coverage
๐ Libraries
๐ Dependencies
- Node.js 16 or later
- Yarn Optional/Recommended
- ODG Message
- ODG TsConfig Last Version
- ODG Exception Last Version
โฉ Get Started
๐ Installation
yarn add @odg/message @odg/axios axios๐ป Usage
For simple example usage, you can use Inversify for Dependency Injection
import { type MessageInterface, type MessageResponse } from "@odg/message";
class Test {
public constructor(
private readonly requester: MessageInterface
) {
}
public async example(): Promise<MessageResponse<
unknown, // Reques Body
Record<string, unknown>, // Response Body
>> {
return this.requester.request({
url: "https://api.github.com/users/ODGodinho",
});
}
}const test = new Test(new AxiosMessage({
// default options axios
}));
console.log(await test.example());๐ Start Project
First install dependencies with the following command
yarn install
# or
npm install๐จ Build and Run
To build the project, you can use the following command
if you change files, you need to run
yarn buildandyarn startagain
yarn build && yarn start
# or
yarn dev๐งช Teste Code
To Test execute this command
yarn test
# or
yarn test:watch1.9.1
8 months ago
1.9.0
8 months ago
1.8.0
8 months ago
1.7.1
10 months ago
1.7.0
10 months ago
1.9.2
8 months ago
1.11.0
8 months ago
1.10.0
8 months ago
1.6.0
2 years ago
1.2.0
2 years ago
1.5.1
2 years ago
1.5.0
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
1.2.1
2 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago