0.3.1 • Published 19 days ago

@aesop-fables/containr-axios v0.3.1

Weekly downloads
-
License
-
Repository
-
Last release
19 days ago

@aesop-fables/containr-axios

Provides a common bootstrapping configuration for using Axios in your Typescript applications (i.e., scrinium apps).

Sample Usage

// Example setup
const container = createContainer([
  useAxios({
    // optionally pass in anything you would to axios.create
    baseURL: 'http://localhost:8080',
  })
  myCustomModule,
]);

// Example usage
class MyApi {
  constructor(@inject(AxiosServices.AxiosInstance) private reaodnly axios: AxiosInstance) {}

  listItems(): AxiosResponse<MyModel[]> {
    return this.axios.get('/list');
  }
}
0.3.1

19 days ago

0.3.0

11 months ago

0.1.1

1 year ago

0.1.0

1 year ago