• Overview
@angular/ssr/node

writeResponseToNodeResponse

function

Streams a web-standard Response into a Node.js ServerResponse or Http2ServerResponse.

  
    function writeResponseToNodeResponse(  source: Response,  destination: ServerResponse<IncomingMessage> | Http2ServerResponse<Http2ServerRequest>): Promise<void>;
  
  

writeResponseToNodeResponse

Promise<void>

Streams a web-standard Response into a Node.js ServerResponse or Http2ServerResponse.

This function adapts the web Response object to write its content to a Node.js response object, handling both HTTP/1.1 and HTTP/2.

@paramsourceResponse
  • The web-standard Response object to stream from.
@paramdestinationServerResponse<IncomingMessage> | Http2ServerResponse<Http2ServerRequest>
  • The Node.js response object (ServerResponse or Http2ServerResponse) to stream into.
@returnsPromise<void>
Jump to details