Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

panthro's avatar

Axios Default Headers

Could someone please explain to me what this is doing in bootstrap and do I need it?

import axios from 'axios'; //not this
window.axios = axios; //not this

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';  //this
0 likes
1 reply

Please or to participate in this conversation.