Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@odg/axios

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@odg/axios

Project Axios using IoC and DI

latest
Source
npmnpm
Version
1.11.0
Version published
Maintainers
1
Created
Source

Stanley Imagem

Stanley Imagem

Axios (Inversion of control)

ODG Message for axios Inversion of control 📦!

codecov Stargazers Made by ODGodinho Forks Repository size GitHub last commit License StyleCI

Table of Contents

🎇 Benefits

  • 🚀 Speed performance Inversion of control
  • 🚨 Code Quality
  • 🎇 Use Interface
  • 🧪 Teste with 100% coverage

📗 Libraries

📁 Dependencies

⏩ 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 build and yarn start again

yarn build && yarn start
# or
yarn dev

🧪 Teste Code

To Test execute this command

yarn test
# or
yarn test:watch

FAQs

Package last updated on 01 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts