( body: Uint8Array, options?: Options.WithContentType )
| 162 | * @since 4.0.0 |
| 163 | */ |
| 164 | export const uint8Array = ( |
| 165 | body: Uint8Array, |
| 166 | options?: Options.WithContentType |
| 167 | ): HttpServerResponse => { |
| 168 | const headers = options?.headers |
| 169 | ? Headers.fromInput(options.headers) |
| 170 | : Headers.empty |
| 171 | return makeResponse({ |
| 172 | status: options?.status ?? 200, |
| 173 | statusText: options?.statusText, |
| 174 | headers, |
| 175 | cookies: options?.cookies ?? Cookies.empty, |
| 176 | body: Body.uint8Array(body, getContentType(options, headers)) |
| 177 | }) |
| 178 | } |
| 179 | |
| 180 | const getContentType = ( |
| 181 | options: Options | undefined, |
nothing calls this directly
no test coverage detected