二、原生实践 Alyson 2024-01-16 39 阅读1分钟 开发接口 环境搭建 简单示例 res.setHeader('Content-type','application/json'); //未命中路由,返回 404 res.writeHead(404,{"Content-type":"text/plain"}); res.write("404 Not Found\n"); res.end(); 使用 接口数据 promise 回调地狱 callback hell promise 实现 promise 处理 postData