Skip to main content
Http2ServerResponse.prototype.statusCode - node__http2.d.ts - Node documentation
property Http2ServerResponse.prototype.statusCode

Usage in Deno

```typescript import { Http2ServerResponse } from "node:node__http2.d.ts"; ```
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. ```js response.statusCode = 404; ``` After response header was sent to the client, this property indicates the status code which was sent out.

Type

number