( body: Uint8Array, options?: ServerResponse.Options.WithContentType )
| 118 | |
| 119 | /** @internal */ |
| 120 | export const uint8Array = ( |
| 121 | body: Uint8Array, |
| 122 | options?: ServerResponse.Options.WithContentType |
| 123 | ): ServerResponse.HttpServerResponse => { |
| 124 | const headers = options?.headers ? Headers.fromInput(options.headers) : Headers.empty |
| 125 | return new ServerResponseImpl( |
| 126 | options?.status ?? 200, |
| 127 | options?.statusText, |
| 128 | headers, |
| 129 | options?.cookies ?? Cookies.empty, |
| 130 | internalBody.uint8Array(body, getContentType(options, headers)) |
| 131 | ) |
| 132 | } |
| 133 | |
| 134 | /** @internal */ |
| 135 | export const text = ( |
nothing calls this directly
no test coverage detected