title: how to set http cookie in axios interceptor?
body: <p>I am wondering how to set up axios interceptor for http cookies.</p>
  
  <p>I use axios in vue SPA, back-end is on laravel, API sets http cookie, but now I need to send it back for some requests.</p>
  
  <p>Actually I have auth token and refresh token, auth token is in local storage (it's short lived), application flow is next: On every request I set auth token in request header, laravel API checks if auth token is valid and if it is request returns data, but if auth token is invalid, I have to make new request with refreshtoken which is in http cookie, I know I can't acces it via javascript so, what should I do? How can I make this work? </p>
  
  <p>Also tricky part here is I don't want to set refresh token on every request, only when auth token needs to be regenerate.</p>
  
  <p>If i misunderstood something, please don't hesitate to put me in the right direction.</p>