想请问下老师 如何设置接口返回的状态码 比如500
来源:5-6 初始化路由

慕沐5315794
2022-03-31
res.writeHead(404,{“Content-type”: “text/plain”})
res.write(“404 Not Found\n”)
res.end()
写回答
1回答
-
双越
2022-04-01
你代码中的第一句,不就设置了 404 这个状态码吗
00
相似问题
想请问下老师 如何设置接口返回的状态码 比如500
来源:5-6 初始化路由
慕沐5315794
2022-03-31
res.writeHead(404,{“Content-type”: “text/plain”})
res.write(“404 Not Found\n”)
res.end()
1回答
双越
2022-04-01
你代码中的第一句,不就设置了 404 这个状态码吗
相似问题