Skip to content

Decoraxios

Decoraxios is a focused Axios toolkit for teams that prefer decorator-based API declarations. The project stays modular: use the core HTTP decorators by default, add mocking only when you need MSW, and bring in IoC / AOP only when your application benefits from class-level dependency wiring and advice composition.

Official sites

Package guide

PackageUse it when
decoraxiosYou want the default root package with the core HTTP decorator surface.
@decoraxios/coreYou want the explicit core package name in imports or package manifests.
@decoraxios/mockYou want decorator-friendly MSW mocking for local development or tests.
@decoraxios/mock-wsYou want standalone WebSocket mocking powered by MSW, with decorator mode available.
@decoraxios/ioc-aopYou want dependency injection and aspect weaving in class-based application code.
@decoraxios/allYou want one package that re-exports the public APIs from every package.

Documentation map

Design principles

  • Decorated methods are declarations. Their method bodies stay as placeholders.
  • The root package remains lightweight and only exposes the core HTTP surface.
  • Mocking and IoC / AOP remain opt-in to avoid extra runtime dependencies in simple apps.
  • Every request entry point stays type-oriented through ApiCall<TResponse, TRequest>.

Official Decoraxios documentation in English and Chinese