客戶端代碼:ios
// 運行在其它服務器上
const xhr = new XMLHttpRequest()
xhr.open('get', 'http://localhost:4000/')
xhr.send(null)
xhr.onload = function () {
console.log(xhr.responseText)
}
複製代碼
05-restful接口規則介紹json
以上規則體現 經過請求方式就能夠判斷操做類型axios
梳理啓動的json-server的接口怎麼去請求:瀏覽器
06-用postman測試接口服務器
07-axios-介紹restful
08-axios-使用工具