( self: HttpServerResponse, status: number, statusText: string | undefined, cookies: Cookies.Cookies, body: Body.HttpBody )
| 1517 | // Shares the headers of `self`, so explicit content headers are not replaced |
| 1518 | // with the body's. |
| 1519 | const copyResponse = ( |
| 1520 | self: HttpServerResponse, |
| 1521 | status: number, |
| 1522 | statusText: string | undefined, |
| 1523 | cookies: Cookies.Cookies, |
| 1524 | body: Body.HttpBody |
| 1525 | ): HttpServerResponse => { |
| 1526 | const response = Object.create(Proto) as Mutable<HttpServerResponse> |
| 1527 | response.status = status |
| 1528 | response.statusText = statusText |
| 1529 | response.cookies = cookies |
| 1530 | response.body = body |
| 1531 | response.headers = self.headers |
| 1532 | return response |
| 1533 | } |
| 1534 | |
| 1535 | /** |
| 1536 | * Converts a Web `Response` to an `HttpServerResponse`. |
no outgoing calls
no test coverage detected