Skip to content

Instantly share code, notes, and snippets.

View emanuelefantin's full-sized avatar

Emanuele Fantin emanuelefantin

View GitHub Profile
@emanuelefantin
emanuelefantin / axios.js
Last active December 19, 2024 09:24 — forked from matthewsuan/axios.js
Axios request queue-like that limits number of requests at any given time
/**
Updated version of matthewsuan/axios.js plugin, to limit concurrent requests.
Added 2 methods to dinamically change MAX_REQUESTS_COUNT and INTERVAL_MS
Use like this:
import axiosLimit from "@/Plugins/axiosLimit.js";
axiosLimit
.setMaxRequestCount(1)
.setIntervalMs(500)