For this particular case: you can add a header to all the requests with axios.interceptors
.
And generally: you can always define and export your function, then just import it several times... not sure if that's what you asked for.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…