Hi team,
In general, we call setToken() and then an endpoint, like:
public async getKubeVersions() {
setToken(linodeToken);
return await getKubernetesVersions();
}
The issue is we call the endpoints very often with a lot of different linode tokens. Behind @linode/api-v4 is a single axios instance, we keep chang it's header for different requests using setToken() and this may cause a race condition. For example, if two getKubeVersions() call at the same time, we may have:
setToken(tokenA);
setToken(tokenB);
getKubernetesVersions(); // mean to use tokenA but actually used tokenB
getKubernetesVersions();
Do we have a way to avoid this? For example, to create our own axois instance and call the endpoints from there?
Thanks.