# res.end

结束响应过程。

# 概要

res.end([data] [, encoding])

# 描述

结束响应过程。这个方法实际上来自 Node 核心,特别是 http.ServerResponseresponse.end() 方法。

用于在没有任何数据的情况下快速结束响应。如果您需要用数据响应,请改用 res.send()res.json() 等方法。

res.end()
res.status(404).end()
Last Updated: 3/22/2023, 7:27:28 PM