( body: Stream.Stream<Uint8Array, E>, options?: Options | undefined )
| 446 | * @since 4.0.0 |
| 447 | */ |
| 448 | export const stream = <E>( |
| 449 | body: Stream.Stream<Uint8Array, E>, |
| 450 | options?: Options | undefined |
| 451 | ): HttpServerResponse => { |
| 452 | const headers = options?.headers |
| 453 | ? Headers.fromInput(options.headers) |
| 454 | : Headers.empty |
| 455 | return makeResponse({ |
| 456 | status: options?.status ?? 200, |
| 457 | statusText: options?.statusText, |
| 458 | headers, |
| 459 | cookies: options?.cookies, |
| 460 | body: Body.stream( |
| 461 | body, |
| 462 | getContentType(options, headers), |
| 463 | options?.contentLength |
| 464 | ) |
| 465 | }) |
| 466 | } |
| 467 | |
| 468 | const HttpPlatformKey = Context.Service< |
| 469 | HttpPlatform, |
no test coverage detected