response.statusCode


在使用隐式头(未显式调用 response.writeHead())时,此属性控制在头部刷新时发送给客户端的状态码。

【When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed.】

response.statusCode = 404; 

在响应头发送给客户端之后,此属性表示已发送的状态码。

【After response header was sent to the client, this property indicates the status code which was sent out.】