# 第 49、50 關旅館訂房網 技術主管終於告訴小杰,他們準備要幫客戶做旅館訂房網的題目,客戶已經有在網站看到一些網站覺得不錯, 後來技術主管發現,其實那些網站都是 fake API,查到源頭才發現是[這個網站](https://challenge.thef2e.com/news/17),所以客戶要求說,先用這網站所提供的 API 先做出雛形來。 # 問題 小杰依照[文件](https://challenge.thef2e.com/news/17)裡的 API,想要去取得此 API **[GET] 取得所有房型**,但發現不管怎麼戳也無法取得所有房型資料, 技術主管只淡淡說了一句:「你送請求時少加 TOKEN 啦!」,就跑去泡咖啡了,這句話究竟是什麼意思呢? * 任務一:請已經了解這知識的學員,寫篇 hackMD,教導該如何夾帶 token, * 任務二:請用 codepen 寫自己的範例,能正確取得 **[GET] 取得所有房型**,並用 ul、li 來呈現各個「**房型名稱**」 ## hackMD 夾帶 token 教學 - [axios夾帶 token](https://hackmd.io/Q6nXsLw5QQ6lZiOiqY6-fA) - [如何使用 axios 傳遞 token](https://williamafil.github.io/notes/2020/08/17/JS-Day-49-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8-axios-%E5%82%B3%E9%81%9E-token/) - [codepen](https://codepen.io/william_k/pen/JjXKRMm?editors=1011)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.