看板 Ajax 關於我們 聯絡資訊
目前嘗試用laravel + vue.js寫網頁 邊看影片邊學習 看到此處時有一些疑惑 https://youtu.be/2pCUxZZq68I?t=8m7s
影片處使用axios去發送request到後端 他說為了讓laravel能分辨ajax request所以要加XMLHttpRequest到header 不過github上axios第一個features就是make XMLHttpRequests 外加我實際測試有無加header都可以從後端得到response 所以...XMLHttpRequest需要加到header嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.235.45.60 ※ 文章網址: https://www.ptt.cc/bbs/Ajax/M.1504238397.A.5DC.html
freeccc: 這個 header 是安全性考量用的,不是說沒設定就拿不到資 09/01 12:47
freeccc: 料,參考這裡解說https://stackoverflow.com/questions/ 09/01 12:47
freeccc: 17478731/whats-the-point-of-the-x-requested-with-hea 09/01 12:47
freeccc: der 09/01 12:47
freeccc: 短網址 https://goo.gl/4psHPY 09/01 12:49