摘要: 请求配置 host="http://localhost:3000" baseUrl="/api/v1/test" filePath="./data/data.json" 1. 发送get请求 默认发送get请求 url="${host}${baseUrl}" curl $url 显式声明get请求 阅读全文
posted @ 2024-04-26 21:49 箫笛 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 安装express-generator pnpm add -g express-generator 查看express-generator 查看版本 express --version 查看帮助 express -h 创建express应用 express -v ejs -c less --git 阅读全文
posted @ 2024-04-26 21:14 箫笛 阅读(14) 评论(0) 推荐(0) 编辑
摘要: fetch 采用模块化设计,api分散在多个对象上(Response对象,Request对象,Header对象), fetch通过数据流(stream对象)处理数据可以分块读取,有利于提高网站性能。 发送GET请求 fetch 函数只传递一个url,默认以get方法发送请求。 promise fet 阅读全文
posted @ 2024-04-26 16:54 箫笛 阅读(78) 评论(0) 推荐(0) 编辑