I reported a 419 error when using axios.post.
there is an API at the backend to get the CSRF token (X-CSRF-TOKEN)
you can only submit data if you add this to the request header.
however, I checked the axios and Baidu, and customized the configuration
const apiData = axios.create ({
baseURI: "address",
headers: {""} / / am I going to add headers: {"Xmuri CSRF token: get the data returned by the above csrf}) is this the request header?
})
getheaders
// apiData apiData.post("")