Getting started
Installation
Prerequisites
- Node.js version 18 or higher.
- A package manager: e.g. npm, pnpm, ...
sh
$ npm add @ogs-gmbh/axios-retrysh
$ pnpm add @ogs-gmbh/axios-retrysh
$ yarn add @ogs-gmbh/axios-retrysh
$ bun add @ogs-gmbh/axios-retryUsage
Now, you're able to import axiosRetry. Take the following line as an example:
example.ts
ts
import { create } from "axios";
import { axiosRetry } from "@ogs-gmbh/axios-retry";
function makeACall() {
const instance = create({
baseURL: "https://ogs.de/example"
});
axiosRetry(instance);
return instance;
}