VSCode Rest Client
取代 Postman
tags: VSCode
Postman
Rest Client
使用 Rest Client 來測試 api VS Code 擴充套件
建立設定檔案: {檔案名稱}.http
- 下圖點擊【GET】上方的【Send Request】就能送出請求
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
使用變數
- Headers 如
Content-Type: application/json
與 {
中間必須有空格,不然會報錯
- 有中文亂碼的問題,在 settings.json
- Ctrl + Shift + P 輸入 Preferences: Open User Settings (JSON)
C:\Users\使用者名稱\AppData\Roaming\Code\User\settings.json
直接在第一行新增即可解決亂碼問題
參考: 18 - Rest Client - HTTP 請求工具