客户端代码: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-使用工具