method

http.ServerResponse.writeInformation

statusCode: number,
headers?: readonly string[] | OutgoingHttpHeaders,
callback?: () => void
): void;

Sends an arbitrary HTTP/1.1 1xx informational response to the client. This is a generic equivalent of response.writeContinue(), response.writeProcessing() and response.writeEarlyHints(), and can be called multiple times before the final response. After the final response headers have been sent (via response.writeHead() or an implicit header), calling this method throws ERR_HTTP_HEADERS_SENT.

Clients receive these responses via the 'information' event on http.ClientRequest.

response.writeInformation(110, { 'X-Progress': '50%' });
@param statusCode

An HTTP 1xx informational status code, between 100 and 199 inclusive, excluding 101 (Switching Protocols) which is only available through the 'upgrade' event.

@param headers

An optional set of headers to send with the informational response. Accepts the same shapes as response.writeHead().

@param callback

Optional, called once the message has been written to the socket.

statusCode: number,
callback: () => void
): void;

Sends an arbitrary HTTP/1.1 1xx informational response to the client. This is a generic equivalent of response.writeContinue(), response.writeProcessing() and response.writeEarlyHints(), and can be called multiple times before the final response. After the final response headers have been sent (via response.writeHead() or an implicit header), calling this method throws ERR_HTTP_HEADERS_SENT.

Clients receive these responses via the 'information' event on http.ClientRequest.

response.writeInformation(110, { 'X-Progress': '50%' });
@param statusCode

An HTTP 1xx informational status code, between 100 and 199 inclusive, excluding 101 (Switching Protocols) which is only available through the 'upgrade' event.

@param callback

Optional, called once the message has been written to the socket.

Referenced types

interface OutgoingHttpHeaders