目錄
- postman簡介
- postman檢測介面
- 總結
postman簡介
Postman 是一種常用的介面測驗工具,可以發送幾乎所有型別的HTTP請求,Postman適用于不同的作業系統,Postman Mac、Windows X32、Windows X64、Linux系統,還支持postman 瀏覽器擴展程式、postman chrome應用程式等,
postman檢測介面
1.postman下載地址:鏈接: postman.找到64位下載好后開即可
2.打開后注冊賬號,登錄后點擊左上角workplace,點擊+new workplace,輸入專案名稱,隨便取一個即可

3.在enter request url輸入本地網址那里就輸入本地的網址http://localhost:8080/me/count,一般都是8080,后面的/me/count是在springbootController類里確認


4.點擊send,測驗put介面,獲取結果如下圖

5.測驗put介面,在中間位置選擇body,再選raw,再選json格式,輸入下列代碼:


{
"count": 100
}
7.點擊send,無結果輸出,如圖:

8.再用get獲取結果,可以看到結果改變,put介面和get介面都可以成功使用

9.再測驗post介面,body那里的代碼可以不改,和put介面一樣,再用get呼叫,可以看到結果變為200,測驗成功

總結
Postman是一種網頁除錯與發送網頁http請求的chrome插件,我們可以用來很方便的模擬get或者post或者其他方式的請求來除錯介面,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/301734.html
標籤:其他
下一篇:QT6安裝與使用
