How can I get the Cookies' `csrftoken` in `Axios.interceptors.request`'s config?
问题 How can I get the Cookies' csrftoken in Axios.interceptors.request 's config? Axios.interceptors.request.use( config => { if ( config.method === "post" || config.method === "put" || config.method === "delete"|| config.method === "get" ) { } if (Cookies.get('token')!==undefined) { config.headers['Authorization']= 'Token '+Cookies.get('token'); } // there I try to get the `csrftoken` in the Cookies, but I can not get. if (Cookies.get('csrftoken')!==undefined) { config.headers['x-csrftoken']=