axios set cookie from response code example
Example 1: axios send request with cookies
axios.get('some api url', {withCredentials: true});
Example 2: axios httponly cookie
server:
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
res.setHeader('Access-Control-Allow-Credentials',true);
client(axios):
axios.defaults.withCredentials = true;