( body: Uint8Array, options?: Options.WithContentType )
| 178 | * @since 4.0.0 |
| 179 | */ |
| 180 | export const uint8Array = ( |
| 181 | body: Uint8Array, |
| 182 | options?: Options.WithContentType |
| 183 | ): HttpServerResponse => { |
| 184 | const headers = options?.headers |
| 185 | ? Headers.fromInput(options.headers) |
| 186 | : Headers.empty |
| 187 | return makeResponse({ |
| 188 | status: options?.status ?? 200, |
| 189 | statusText: options?.statusText, |
| 190 | headers, |
| 191 | cookies: options?.cookies ?? Cookies.empty, |
| 192 | body: Body.uint8Array(body, getContentType(options, headers)) |
| 193 | }) |
| 194 | } |
| 195 | |
| 196 | const getContentType = ( |
| 197 | options: Options | undefined, |
nothing calls this directly
no test coverage detected